-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructions for setting up vue-test
when migrating from Vue 2 to Vue 3?
#540
Comments
I see some time has passed since your question, but documenting this here in case it helps anyone. Single file components seem to be transformed assuming However, it turns out that compilerOptions for 'vue-jest' can be configured, similar to what might be set up in the For example, adding the following in
This can also nicely integrate with |
Me and my team are in the process of migrating our codebase to Vue 3.
We installed the compat build, which allows us to not break most components that are still in Vue 2.
However, our tests started breaking since we installed
@vue/vue3-jest
because it seems to only assume that the components being tested are all in Vue 3.For example, in
@vue/vue3-jest/lib/process.js
, theprocessScriptSetup
andprocessTemplate
doesn't compile the scripts ifdescriptor.scriptSetup
can't be found, which would be the case for any Vue 2 components.Is there a workaround for this?
Which
vue-jest
version should we be using during the migration when we will have both Vue 2 and 3 components co-exist?The text was updated successfully, but these errors were encountered: