From 532428e6d273cc44e5de22ab52fdbadade1915d6 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Wed, 18 Sep 2019 00:03:32 +0800 Subject: [PATCH] feat!: update to jest 25 Jest has released version 25 under the `next` dist-tag: - https://www.npmjs.com/package/jest/v/25.0.0 - https://github.com/facebook/jest/pull/8862 See breaking changes at https://github.com/facebook/jest/blob/6c0a16ab2f88ea645c04880a5491b3a8c2dfc66b/CHANGELOG.md The maintainer promised no more user facing breaking changes planned https://github.com/facebook/jest/issues/8956#issuecomment-531671339 Considering Vue CLI does not bump the major version often, we need to use the latest possible version. Currently there will be warnings from ts-jest. Once this PR gets merged https://github.com/kulshekhar/ts-jest/pull/1232 the warnings will be eliminated. --- packages/@vue/cli-plugin-unit-jest/generator/index.js | 1 - packages/@vue/cli-plugin-unit-jest/package.json | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/@vue/cli-plugin-unit-jest/generator/index.js b/packages/@vue/cli-plugin-unit-jest/generator/index.js index 998bf8b805..2b6be1446b 100644 --- a/packages/@vue/cli-plugin-unit-jest/generator/index.js +++ b/packages/@vue/cli-plugin-unit-jest/generator/index.js @@ -54,7 +54,6 @@ module.exports = (api, _, __, invoking) => { if (api.hasPlugin('babel')) { api.extendPackage({ devDependencies: { - 'babel-jest': '^24.8.0', '@babel/core': '^7.4.5' } }) diff --git a/packages/@vue/cli-plugin-unit-jest/package.json b/packages/@vue/cli-plugin-unit-jest/package.json index b5daa2af78..e7a67f73ca 100644 --- a/packages/@vue/cli-plugin-unit-jest/package.json +++ b/packages/@vue/cli-plugin-unit-jest/package.json @@ -27,8 +27,8 @@ "@babel/plugin-transform-modules-commonjs": "^7.4.4", "@vue/cli-shared-utils": "^4.0.0-rc.3", "babel-core": "7.0.0-bridge.0", - "babel-jest": "^24.8.0", - "jest": "^24.8.0", + "babel-jest": "^25.0.0", + "jest": "^25.0.0", "jest-serializer-vue": "^2.0.2", "jest-transform-stub": "^2.0.0", "jest-watch-typeahead": "^0.3.1",