Closed
Description
Describe the bug
When trying to use the router option in a mocha + chai project, it fails with TypeError: VueRouter is not a constructor
To Reproduce
Run unit tests:
https://github.com/FCalabria/testing-library-mocha
The same project with jest, works perfectly.
Related information:
@testing-library/vue
version: 4.1.0Vue
version: 2.6.10
Changing the way to import the library fixes the bug, but breaks it for jest
const VueRouter = require('vue-router') // current code, works with jest
const VueRouter = require('vue-router').default // fix for mocha, breaks jest