Skip to content

Commit

Permalink
Remove unneeded and problematic vue-cli-plugin-unit-test
Browse files Browse the repository at this point in the history
It was causing issues during dependency upgrades and wasn't really used
except for its preset definition.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
  • Loading branch information
PVince81 authored and backportbot-nextcloud[bot] committed Sep 26, 2022
1 parent ac2e94f commit f22539a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
10 changes: 9 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const ignorePatterns = [
]

module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/no-babel',
testMatch: ['<rootDir>/apps/*/src/**/*.(spec|test).(ts|js)'],
modulePathIgnorePatterns: ["<rootDir>/apps-extra/"],
transformIgnorePatterns: [
Expand All @@ -45,8 +44,17 @@ module.exports = {
collectCoverageFrom: [
'<rootDir>/apps/*/src/**/*.{js,vue}',
],

testEnvironment: 'jest-environment-jsdom',

moduleFileExtensions: [
'js',
'vue',
],

transform: {
// process `*.js` files with `babel-jest`
'.*\\.(js)$': 'babel-jest',
'^.+\\.vue$': '@vue/vue2-jest',
},
}
20 changes: 4 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"@nextcloud/sharing": "^0.1.0",
"@nextcloud/vue": "^7.0.0-beta.4",
"@nextcloud/vue-dashboard": "^2.0.1",
"@vue/cli-plugin-unit-jest": "^4.5.15",
"autosize": "^5.0.1",
"backbone": "^1.4.1",
"blueimp-md5": "^2.19.0",
Expand Down Expand Up @@ -111,6 +110,8 @@
"@testing-library/user-event": "^14.1.1",
"@testing-library/vue": "^5.8.3",
"@vue/test-utils": "^1.3.0",
"@vue/vue2-jest": "^29.1.1",
"babel-jest": "^29.0.3",
"babel-loader": "^8.2.5",
"babel-loader-exclude-node-modules-except": "^1.2.1",
"css-loader": "^6.7.1",
Expand All @@ -121,7 +122,8 @@
"handlebars-loader": "^1.7.1",
"jasmine-core": "~2.5.2",
"jasmine-sinon": "^0.4.0",
"jest": "^26.6.3",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"jsdoc": "^3.6.10",
"jsdom": "^19.0.0",
"karma": "^6.4.0",
Expand All @@ -138,7 +140,6 @@
"sass-loader": "^12.6.0",
"sinon": "<= 5.0.7",
"style-loader": "^3.3.1",
"vue-jest": "^4.0.1",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.7.10",
"webpack": "^5.74.0",
Expand All @@ -154,18 +155,5 @@
},
"overrides": {
"colors": "1.4.0"
},
"jest": {
"moduleFileExtensions": [
"js",
"vue"
],
"setupFilesAfterEnv": [
"<rootDir>/tests/jestSetup.js"
],
"transform": {
"^.+\\.js$": "<rootDir>/tests/jestBabelTransformer.js",
"^.+\\.vue$": "vue-jest"
}
}
}

0 comments on commit f22539a

Please sign in to comment.