You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vitest version 0.19.1 is fine with this, However after upgrading to 0.20.3 when mount from "@vue/test-utils": "^2.0.2",
causes the following error
FAIL src/components/HelloWorld.test.ts [ src/components/HelloWorld.test.ts ]
SyntaxError: Named export 'BaseTransition' not found. The requested module 'vue' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'vue';
const { transformVNodeArgs, Transition, BaseTransition, defineComponent, h, TransitionGroup, Teleport, nextTick, setDevtoolsHook, shallowReactive, reactive, isRef, createApp, computed } = pkg;
Reproduction
Create a new vite project, install viteest 0.20.3 and @vue/test-utils any version.
The text was updated successfully, but these errors were encountered:
michaelmano
changed the title
vitest with mount from @vue/test-utils SyntaxError
vitest with mount from @vue/test-utils SyntaxError (0.20.3)
Aug 5, 2022
Describe the bug
Vitest version
0.19.1
is fine with this, However after upgrading to0.20.3
when mount from"@vue/test-utils": "^2.0.2",
causes the following error
Reproduction
Create a new vite project, install viteest 0.20.3 and @vue/test-utils any version.
Then create a new test file with the following
This will cause the error.
Revert vitest to 0.19.1 and its working as expected.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: