-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Support Jest 28 with @vue/cli-plugin-unit-jest
#7129
Comments
I think you mean jest 28 instead of 18 😉 |
And @vue/vue3-jest is now at 28.0.0 too. |
@vue/cli-plugin-unit-jest
@vue/cli-plugin-unit-jest
It'd be nice if you add support for jest v28. Waiting for it :) |
This is breaking my build, any suggestions (tried deleting package-lock & node_modules) or I have to just wait for the upgrade?
|
@trent-abc You need to use ts-jest 27.
|
Yes but the way this is made currently feels like a pain, 1 package that updates, then one vue package that follows up, then the vue-cli-plugin package that needs to follow up. A big chain of update.. Either version range should be more lax in the vue-cli-plugin or there should be autoupgrades with renovate, otherwise updates takes months before they make it to the vue-cli plugin It's the same issue with eslint |
any good news? |
This is holding up our upgrades to Jest 28. |
vue-jest added support for the <script setup> syntax in the v29.1.0 which is for jest 29 (vuejs/vue-jest#489). <script setup> without testing support is kind of useless :)If using npm 8.3.0 (I think ?) we can use the `overrides` property in the package.json to override `jest`, `ts-jest` and `@vue/vue2-jest` in `@vue/cli-plugin-unit-jest`. edit: for some reason I can't use markdown code blocks |
This is blocking me as well. My test coverage is failing #7040 and the source maps were only fixed for v28 vuejs/vue-jest#486 so I'm unable to upgrade and resolve being stuck at 27.
|
Any update on it? |
Same over here trying to install ❯ npm i --save-dev @vue/cli-plugin-unit-jest
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @vue/[email protected]
npm ERR! Found: @vue/[email protected]
npm ERR! node_modules/@vue/vue2-jest
npm ERR! dev @vue/vue2-jest@"^29.1.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @vue/vue2-jest@"^27.0.0-alpha.3" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-unit-jest
npm ERR! dev @vue/cli-plugin-unit-jest@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @vue/[email protected]
npm ERR! node_modules/@vue/vue2-jest
npm ERR! peerOptional @vue/vue2-jest@"^27.0.0-alpha.3" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-unit-jest
npm ERR! dev @vue/cli-plugin-unit-jest@"*" from the root project |
Not to sound insensitive (I know how dev work goes), but can we please get a release that supports jest 29? We cannot upgrade anything related to jest because of this package. |
I was able to successfully upgrade to jest 28/29, but it does require the use of
Ofcourse you'll have to address any jest breaking changes in your codebase. (My project is in JS, TypeScript might require more changes) upgrade guides: |
After updating all my jest-related deps to
It resolved, and I then got the following error when running with
Same error happens for jest-environment-node/ I figured calling "scripts": {
"test": "jest",
...
} Which works! I still have the |
I can confirm, this solution works. Thanks for sharing @ErikBjare |
Where we need to add this overrides? Could you please help me. I'm also facing same issue |
It goes into your |
Requires to force @vue/cli-plugin-unit-jest to use a more recent version of @vue/vue2-jest See vuejs/vue-cli#7129
Requires to force @vue/cli-plugin-unit-jest to use a more recent version of @vue/vue2-jest See vuejs/vue-cli#7129
will this also add support for @vue/vue3-jest to v28 and v29 because its the same issue I am migrating my vue 2 project to vue 3 and i am stuck figuring out the versions for updating my test cases |
What problem does this feature solve?
Since Jest 18 was released ( https://jestjs.io/blog/2022/04/25/jest-28 ), it would be preferable if
@vue/cli-plugin-unit-jest
also supports it.There is also already a version 28 for
ts-jest
available that is compatible with Jest 28.What does the proposed API look like?
n/a
The text was updated successfully, but these errors were encountered: