Skip to content

Commit 0b5ae42

Browse files
authored
feat!: update jest to v26 (#6116)
closes #5873 closes #5874 closes #5114 closes #5680 closes #5573
1 parent a153af8 commit 0b5ae42

File tree

6 files changed

+794
-650
lines changed

6 files changed

+794
-650
lines changed

docs/migrations/migrate-from-v4.md

+6
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ Please consider switching to ESLint. You can check out [`tslint-to-eslint-config
101101
* Cypress is required as a peer dependency.
102102
* Cypress is updated from v3 to v5. See [Cypress Migration Guide](https://docs.cypress.io/guides/references/migration-guide.html) for detailed instructions of the migration process.
103103

104+
### Unit-Jest Plugin
105+
106+
* The underlying `jest`-related packages are upgraded from v24 to v26. For most users the transition would be seamless. See their corresponding changelogs for more detail:
107+
* [jest, babel-jest](https://github.com/facebook/jest/blob/v26.6.3/CHANGELOG.md)
108+
* [ts-jest](https://github.com/kulshekhar/ts-jest/blob/v26.4.4/CHANGELOG.md)
109+
104110
### Unit-Mocha Plugin
105111

106112
* `mocha` is upgraded from v6 to v7, please refer to the [release notes of mocha v7](https://github.com/mochajs/mocha/releases/tag/v7.0.0) for a complete list of breaking changes.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@vuepress/plugin-pwa": "^1.5.4",
4848
"@vuepress/theme-vue": "^1.5.4",
4949
"babel-core": "7.0.0-bridge.0",
50-
"babel-jest": "^24.9.0",
50+
"babel-jest": "^26.6.3",
5151
"chromedriver": "^87.0.0",
5252
"debug": "^4.1.0",
5353
"eslint": "^7.13.0",
@@ -65,7 +65,7 @@
6565
"graphql": "^14.6.0",
6666
"http-server": "^0.12.3",
6767
"inquirer": "^7.1.0",
68-
"jest": "^24.9.0",
68+
"jest": "^26.6.3",
6969
"lerna": "^3.22.0",
7070
"lerna-changelog": "^1.0.1",
7171
"lint-staged": "^9.5.0",

packages/@vue/cli-plugin-typescript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"devDependencies": {
4848
"@types/chai": "^4.2.11",
49-
"@types/jest": "^24.0.19",
49+
"@types/jest": "^26.0.16",
5050
"@types/mocha": "^7.0.2",
5151
"jscodeshift": "^0.10.0",
5252
"typescript": "~3.9.3",

packages/@vue/cli-plugin-unit-jest/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,17 @@
2525
"dependencies": {
2626
"@babel/core": "^7.11.6",
2727
"@babel/plugin-transform-modules-commonjs": "^7.9.6",
28-
"@types/jest": "^24.0.19",
28+
"@types/jest": "^26.0.16",
2929
"@vue/cli-shared-utils": "^4.5.8",
3030
"babel-core": "^7.0.0-bridge.0",
31-
"babel-jest": "^24.9.0",
31+
"babel-jest": "^26.6.3",
3232
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
3333
"deepmerge": "^4.2.2",
34-
"jest": "^24.9.0",
35-
"jest-environment-jsdom-fifteen": "^1.0.2",
34+
"jest": "^26.6.3",
3635
"jest-serializer-vue": "^2.0.2",
3736
"jest-transform-stub": "^2.0.0",
3837
"jest-watch-typeahead": "^0.4.2",
39-
"ts-jest": "^24.2.0",
38+
"ts-jest": "^26.4.4",
4039
"vue-jest": "^3.0.5"
4140
},
4241
"devDependencies": {

packages/@vue/cli-plugin-unit-jest/presets/default/jest-preset.js

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ module.exports = {
1818
moduleNameMapper: {
1919
'^@/(.*)$': '<rootDir>/src/$1'
2020
},
21-
testEnvironment: 'jest-environment-jsdom-fifteen',
2221
// serializer for snapshots
2322
snapshotSerializers: [
2423
'jest-serializer-vue'

0 commit comments

Comments
 (0)