Skip to content

Commit f923e95

Browse files
committed
chore: update to jest 27
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.
1 parent 67a3e7a commit f923e95

File tree

3 files changed

+1251
-2315
lines changed

3 files changed

+1251
-2315
lines changed

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = {
1212
},
1313
testEnvironment: 'jsdom',
1414
transform: {
15-
'^.+\\.vue$': 'vue-jest',
15+
'^.+\\.vue$': '@vue/vue3-jest',
1616
'^.+\\js$': 'babel-jest'
1717
},
1818
moduleFileExtensions: ['vue', 'js', 'json', 'jsx', 'ts', 'tsx', 'node'],

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
"@vue/compat": "3.2.31",
2727
"@vue/compiler-dom": "3.2.31",
2828
"@vue/compiler-sfc": "3.2.31",
29-
"babel-jest": "^26.6.3",
30-
"babel-preset-jest": "^27.5.1",
29+
"@vue/vue3-jest": "27.0.0-alpha.4",
30+
"babel-jest": "27.1.0",
31+
"babel-preset-jest": "27.0.6",
3132
"husky": "^7.0.4",
32-
"jest": "25.5.4",
33+
"jest": "27.5.1",
3334
"jsdom": "^19.0.0",
3435
"jsdom-global": "^3.0.2",
3536
"lint-staged": "^12.3.3",
@@ -38,7 +39,7 @@
3839
"reflect-metadata": "^0.1.13",
3940
"rollup": "^2.67.2",
4041
"rollup-plugin-typescript2": "^0.31.2",
41-
"ts-jest": "25.3.1",
42+
"ts-jest": "27.1.3",
4243
"tslib": "2.3.1",
4344
"typescript": "4.5.5",
4445
"vitepress": "^0.22.0",

0 commit comments

Comments
 (0)