vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.76k stars 6.33k forks source link

Support Jest 28 with `@vue/cli-plugin-unit-jest` #7129

Open sceee opened 2 years ago

sceee commented 2 years ago

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

WIStudent commented 2 years ago

Support Jest 18 with @vue/cli-plugin-unit-jest

I think you mean jest 28 instead of 18 😉

realityfilter commented 2 years ago

And @vue/vue3-jest is now at 28.0.0 too.

msmosavar commented 2 years ago

It'd be nice if you add support for jest v28. Waiting for it :)

trent-abc commented 2 years ago

This is breaking my build, any suggestions (tried deleting package-lock & node_modules) or I have to just wait for the upgrade?

npm install
...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: frontend@0.1.0
npm ERR! Found: ts-jest@28.0.4
npm ERR! node_modules/ts-jest
npm ERR!   dev ts-jest@"28.0.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional ts-jest@"^27.0.4" from @vue/cli-plugin-unit-jest@5.0.7
npm ERR! node_modules/@vue/cli-plugin-unit-jest
npm ERR!   dev @vue/cli-plugin-unit-jest@"^5.0.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
WIStudent commented 2 years ago

@trent-abc You need to use ts-jest 27.

npm install -D ts-jest@27
Tofandel commented 2 years ago

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

xwnwho commented 1 year ago

any good news?

markhalliwell commented 1 year ago

This is holding up our upgrades to Jest 28.

Vahelnir commented 1 year ago

vue-jest added support for the Githubissues.

  • Githubissues is a development platform for aggregating issues.