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 Feb 13, 2022
1 parent 67a3e7a commit f923e95
Show file tree
Hide file tree
Showing 3 changed files with 1,251 additions and 2,315 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$': '@vue/vue3-jest',
'^.+\\js$': 'babel-jest'
},
moduleFileExtensions: ['vue', 'js', 'json', 'jsx', 'ts', 'tsx', 'node'],
Expand Down
9 changes: 5 additions & 4 deletions package.json
Expand Up @@ -26,10 +26,11 @@
"@vue/compat": "3.2.31",
"@vue/compiler-dom": "3.2.31",
"@vue/compiler-sfc": "3.2.31",
"babel-jest": "^26.6.3",
"babel-preset-jest": "^27.5.1",
"@vue/vue3-jest": "27.0.0-alpha.4",
"babel-jest": "27.1.0",
"babel-preset-jest": "27.0.6",
"husky": "^7.0.4",
"jest": "25.5.4",
"jest": "27.5.1",
"jsdom": "^19.0.0",
"jsdom-global": "^3.0.2",
"lint-staged": "^12.3.3",
Expand All @@ -38,7 +39,7 @@
"reflect-metadata": "^0.1.13",
"rollup": "^2.67.2",
"rollup-plugin-typescript2": "^0.31.2",
"ts-jest": "25.3.1",
"ts-jest": "27.1.3",
"tslib": "2.3.1",
"typescript": "4.5.5",
"vitepress": "^0.22.0",
Expand Down

0 comments on commit f923e95

Please sign in to comment.