vue-test-utils-compat
vue-test-utils-compat copied to clipboard
Support for CommonJS
Right now VTUC only supports ES Modules, but not every nodejs environment supports these types of modules and does require a compilation step. It would provide a much better developer experience if it could support CommonJS modules as well.
It would also go well with the readme which uses CommonJS import style.
As a temporary solution you might use this in your jest.config.js if you're using Jest of course:
module.exports = {
transformIgnorePatterns: ['/node_modules/(?!vue-test-utils-compat)'],
}
+1 on this. I couldn't even get jest to transpile this package with transformIgnorePatterns and wasn't able to figure out why, so I ended up just copying the code into my own project.