Commit c151ceba authored by Lukas Eipert's avatar Lukas Eipert

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.
parent 40ec172f
...@@ -40,8 +40,7 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') { ...@@ -40,8 +40,7 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') {
// Jest is running in node environment // Jest is running in node environment
if (BABEL_ENV === 'jest') { if (BABEL_ENV === 'jest') {
plugins.push('transform-es2015-modules-commonjs'); plugins.push('@babel/plugin-transform-modules-commonjs');
plugins.push('dynamic-import-node');
} }
module.exports = { presets, plugins }; module.exports = { presets, plugins };
...@@ -29,7 +29,7 @@ module.exports = { ...@@ -29,7 +29,7 @@ module.exports = {
cacheDirectory: '<rootDir>/tmp/cache/jest', cacheDirectory: '<rootDir>/tmp/cache/jest',
modulePathIgnorePatterns: ['<rootDir>/.yarn-cache/'], modulePathIgnorePatterns: ['<rootDir>/.yarn-cache/'],
reporters, reporters,
setupTestFrameworkScriptFile: '<rootDir>/spec/frontend/test_setup.js', setupFilesAfterEnv: ['<rootDir>/spec/frontend/test_setup.js'],
restoreMocks: true, restoreMocks: true,
transform: { transform: {
'^.+\\.(gql|graphql)$': 'jest-transform-graphql', '^.+\\.(gql|graphql)$': 'jest-transform-graphql',
......
...@@ -128,17 +128,13 @@ ...@@ -128,17 +128,13 @@
"xterm": "^3.5.0" "xterm": "^3.5.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"@gitlab/eslint-config": "^1.4.0", "@gitlab/eslint-config": "^1.4.0",
"@vue/test-utils": "^1.0.0-beta.25", "@vue/test-utils": "^1.0.0-beta.25",
"axios-mock-adapter": "^1.15.0", "axios-mock-adapter": "^1.15.0",
"babel-core": "^7.0.0-bridge", "babel-jest": "^24.1.0",
"babel-jest": "^23.6.0",
"babel-plugin-dynamic-import-node": "^2.2.0",
"babel-plugin-istanbul": "^5.1.0", "babel-plugin-istanbul": "^5.1.0",
"babel-plugin-rewire": "^1.2.0", "babel-plugin-rewire": "^1.2.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-template": "^6.26.0",
"babel-types": "^6.26.0",
"chalk": "^2.4.1", "chalk": "^2.4.1",
"commander": "^2.18.0", "commander": "^2.18.0",
"docdash": "^1.0.2", "docdash": "^1.0.2",
...@@ -148,7 +144,7 @@ ...@@ -148,7 +144,7 @@
"eslint-plugin-html": "5.0.0", "eslint-plugin-html": "5.0.0",
"eslint-plugin-import": "^2.14.0", "eslint-plugin-import": "^2.14.0",
"eslint-plugin-jasmine": "^2.10.1", "eslint-plugin-jasmine": "^2.10.1",
"eslint-plugin-jest": "^22.1.0", "eslint-plugin-jest": "^22.3.0",
"gettext-extractor": "^3.3.2", "gettext-extractor": "^3.3.2",
"gettext-extractor-vue": "^4.0.1", "gettext-extractor-vue": "^4.0.1",
"graphql-tag": "^2.10.0", "graphql-tag": "^2.10.0",
...@@ -156,8 +152,8 @@ ...@@ -156,8 +152,8 @@
"jasmine-core": "^2.9.0", "jasmine-core": "^2.9.0",
"jasmine-diff": "^0.1.3", "jasmine-diff": "^0.1.3",
"jasmine-jquery": "^2.1.1", "jasmine-jquery": "^2.1.1",
"jest": "^23.6.0", "jest": "^24.1.0",
"jest-junit": "^5.2.0", "jest-junit": "^6.3.0",
"jsdoc": "^3.5.5", "jsdoc": "^3.5.5",
"jsdoc-vue": "^1.0.0", "jsdoc-vue": "^1.0.0",
"karma": "^3.0.0", "karma": "^3.0.0",
...@@ -175,10 +171,13 @@ ...@@ -175,10 +171,13 @@
"stylelint": "^9.10.1", "stylelint": "^9.10.1",
"stylelint-config-recommended": "^2.1.0", "stylelint-config-recommended": "^2.1.0",
"stylelint-scss": "^3.5.3", "stylelint-scss": "^3.5.3",
"vue-jest": "^3.0.2", "vue-jest": "^4.0.0-beta.2",
"webpack-dev-server": "^3.1.14", "webpack-dev-server": "^3.1.14",
"yarn-deduplicate": "^1.1.0" "yarn-deduplicate": "^1.1.0"
}, },
"resolutions": {
"vue-jest/ts-jest": "24.0.0"
},
"engines": { "engines": {
"node": ">=8.10.0", "node": ">=8.10.0",
"yarn": "^1.10.0" "yarn": "^1.10.0"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment