Upgrade jest and related dependencies

This removes other outdated babel@6 dependencies as well.

Unfortunately the newer version of vue-jest has a dependency of an older
version of ts-jest. In order to satisfy the peerDependency from ts-jest,
we are forcing the version@24. The only "breaking" change from ts-jest
23->24 is that it requires a newer version of jest. This might be
obsolete soon, as vue-jest plans on switching to babel eventually.
上级 40ec172f
......@@ -40,8 +40,7 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') {
// Jest is running in node environment
if (BABEL_ENV === 'jest') {
plugins.push('transform-es2015-modules-commonjs');
plugins.push('dynamic-import-node');
plugins.push('@babel/plugin-transform-modules-commonjs');
}
module.exports = { presets, plugins };
......@@ -29,7 +29,7 @@ module.exports = {
cacheDirectory: '<rootDir>/tmp/cache/jest',
modulePathIgnorePatterns: ['<rootDir>/.yarn-cache/'],
reporters,
setupTestFrameworkScriptFile: '<rootDir>/spec/frontend/test_setup.js',
setupFilesAfterEnv: ['<rootDir>/spec/frontend/test_setup.js'],
restoreMocks: true,
transform: {
'^.+\\.(gql|graphql)$': 'jest-transform-graphql',
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册