Skip to content
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 #467

Closed
Theiaz opened this issue Apr 27, 2022 · 3 comments · Fixed by #468
Closed

Support jest 28 #467

Theiaz opened this issue Apr 27, 2022 · 3 comments · Fixed by #468
Labels
upstream Due to other packages (like Jest) vue2-jest Vue 2 vue3-jest Vue 3
Milestone

Comments

@Theiaz
Copy link

Theiaz commented Apr 27, 2022

Jest 28 has been released two days ago. We upgraded our project following the official migration guide.

Currently, we are using the following versions:

  "devDependencies": {
    "@vue/vue3-jest": "27.0.0",
    "babel-jest": "27.5.1",
    "jest": "27.5.1",
  },
  "dependencies": {
    "@jest/globals": "27.5.1",
    "vue": "3.2.33",
  }

After upgrading to v28, many of our tests are failing with the following error message:

Test suite failed to run

    TypeError: babelJest.getCacheKey is not a function

      at Object.getCacheKey (node_modules/@vue/vue3-jest/lib/index.js:13:19)
      at ScriptTransformer._getCacheKey (node_modules/@jest/transform/build/ScriptTransformer.js:278:41)
      at ScriptTransformer._getFileCachePath (node_modules/@jest/transform/build/ScriptTransformer.js:349:27)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:590:32)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:760:40)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:817:19)

I have not found any hints in this repo when vue-jest will support jest v28. Are there any plans or a roadmap?

nicksellen added a commit to karrot-dev/karrot-frontend that referenced this issue Apr 27, 2022
valentinpalkovic pushed a commit to valentinpalkovic/vue-jest that referenced this issue Apr 27, 2022
fixes vuejs#467

[BREAKING CHANGE]: Drop support for jest 27
@Tofandel
Copy link

It's funny, it's the same error message as when vue-jest 26 didn't support babel-jest 27 as well

@lmiller1990
Copy link
Member

Yes, we should support this. Are you interested in working on this? It looks like we just need to work through the differences.

valentinpalkovic pushed a commit to valentinpalkovic/vue-jest that referenced this issue May 6, 2022
fixes vuejs#467

[BREAKING CHANGE]: Drop support for jest 27
tiltec added a commit to karrot-dev/karrot-frontend that referenced this issue May 8, 2022
* rename styl files to sass files

* install quasar v2 and quasar/app v3

* upgrade eslint

* update quasar.conf.js

* remove hard-source-webpack-plugin

It is not compatible with webpack 5. mzgoddard/hard-source-webpack-plugin#546

* migrate stylus syntax to sass syntax

* fix line in .eslintrc

* upgrade vue router

https://next.router.vuejs.org/guide/migration/index.html

* upgrade vuex

https://next.quasar.dev/start/upgrade-guide#vuex-v4

* upgrade vue-i18n

https://next.quasar.dev/start/upgrade-guide#vue-i18n-v9

* content-class -> class and content-style -> style

https://next.quasar.dev/start/upgrade-guide#qdrawer-qdialog-qmenu-qtooltip

* update QScrollObserver

https://next.quasar.dev/start/upgrade-guide#qscrollobserver

* update QTable

://next.quasar.dev/start/upgrade-guide#qtable

* zh-hant -> zh-TW

* add stylus loader

* upgrade vue-router, vuex, eslint-parser

downgrade stylus-loader

* remove old vue dependency

* fix datastore and boot files

* WIP fix storybook

* fix storybook setup

* fix first story

* fix i18n datetime breaking change

* fix storybook $icon support

* rewrite some component styles to sass

* change stylelint to look for sass files

* remove $listeners

* WIP messy upgrade

* fix two more tests

* updates & fixes

* yarn upgrade

* add @-alias for service worker compilation

* try to fix some tests

* rewrite '>>>' to '::v-deep()'

* add percentage sign

* update dependencies

* add back margin on feedbackitem

* fix statistics sidenav entry

* fix some redirects

* fix: value -> modelValue

* fix date-time input on small screens

* fix search

* ignore storybook-static

* hey linter

* hey hey

* fix mobile sidenav

* fix some map stuff

* avoid CSP by using vue-i18n runtime

* Revert "avoid CSP by using vue-i18n runtime"

This reverts commit 7438954.

* yarn upgrade

* skip extra upgrade step

* drop outdated comment

* clarify comment about compat mode

* Fix sending wall messages

* Update deps

* Downgrade to jest 27

Until vuejs/vue-jest#467

* replace unmaintained eslint-plugin-node
with eslint-plugin-n

* adjust code style

eslint-config-standard has evolved

* try skipping one test

* Fix storyshot tests

* Update snapshots

* Style fixes

* Remove debug logging

* Fix router tests

* Fix signup component test

* Fix conversation tests

* Fix map tests

* Style fixes

* Update snapshots

There is a discrepancy with the date formatting depending on
different installations of nodejs, so this might be an ongoing
issue....

* Explain use of markRaw

* remove double space

Co-authored-by: pogopaule <[email protected]>
Co-authored-by: Nick Sellen <[email protected]>
@nogic1008 nogic1008 added this to the 28.x milestone May 9, 2022
@nogic1008 nogic1008 added vue3-jest Vue 3 upstream Due to other packages (like Jest) vue2-jest Vue 2 labels May 9, 2022
lmiller1990 pushed a commit that referenced this issue May 17, 2022
* Support Jest 28

fixes #467

[BREAKING CHANGE]: Drop support for jest 27

* Update ts-jest to use latest version

* Update Typescript

* Drop support for Node 10

Jest 28 dropped Node 10 support as well

* Update Readme

Co-authored-by: Valentin Palkovič <[email protected]>
@Theiaz
Copy link
Author

Theiaz commented May 18, 2022

@lmiller1990 and @valentinpalkovic Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Due to other packages (like Jest) vue2-jest Vue 2 vue3-jest Vue 3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants