Skip to content

Commit

Permalink
chore: update to jest 27
Browse files Browse the repository at this point in the history
Updates jest, ts-jest and babel-jest to v27.
vue-jest v5 does not support jest v27,
so a new vue3-jest package has been introduced (see vuejs/vue-jest#343),
with a version number aligned on the jest version (as ts-jest and babel-jest do).

This commits replaces vue-jest by vue3-jest, and updates the jest config to use this new trasnformer.
This will be the default Vue CLI setup in the future.
  • Loading branch information
cexbrayat committed Aug 30, 2021
1 parent 437aac9 commit 226d3f1
Show file tree
Hide file tree
Showing 3 changed files with 1,290 additions and 3,003 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Expand Up @@ -12,7 +12,7 @@ module.exports = {
},
testEnvironment: 'jsdom',
transform: {
'^.+\\.vue$': 'vue-jest',
'^.+\\.vue$': 'vue3-jest',
'^.+\\js$': 'babel-jest'
},
moduleFileExtensions: ['vue', 'js', 'json', 'jsx', 'ts', 'tsx', 'node'],
Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -26,10 +26,10 @@
"@vue/compat": "3.2.4",
"@vue/compiler-dom": "3.2.6",
"@vue/compiler-sfc": "3.2.6",
"babel-jest": "^26.6.3",
"babel-preset-jest": "^27.0.6",
"babel-jest": "27.1.0",
"babel-preset-jest": "27.0.6",
"husky": "^7.0.1",
"jest": "25.5.4",
"jest": "27.1.0",
"jsdom": "^17.0.0",
"jsdom-global": "^3.0.2",
"lint-staged": "^11.1.2",
Expand All @@ -38,13 +38,13 @@
"reflect-metadata": "^0.1.13",
"rollup": "^2.56.3",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "25.3.1",
"ts-jest": "27.0.5",
"tslib": "^2.3.1",
"typescript": "^4.3.5",
"vitepress": "^0.16.1",
"vue": "3.2.6",
"vue-class-component": "^8.0.0-rc.1",
"vue-jest": "^5.0.0-alpha.10",
"vue3-jest": "27.0.0-alpha.2",
"vue-router": "^4.0.11",
"vue-tsc": "0.3.0",
"vuex": "^4.0.2"
Expand Down

0 comments on commit 226d3f1

Please sign in to comment.