Skip to content

Commit 8d7bac1

Browse files
committed
chore: remove common test dependencies
By removing dependencies that already exist in the root package, we can greatly increase the speed of each test suite as `yarn install` has far less work to do.
1 parent 4425275 commit 8d7bac1

File tree

5 files changed

+3
-49
lines changed

5 files changed

+3
-49
lines changed

e2e/__projects__/babel-in-package/package.json

-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77
"scripts": {
88
"test": "jest --no-cache test.js"
99
},
10-
"dependencies": {
11-
"vue": "3.0.0-alpha.10"
12-
},
13-
"devDependencies": {
14-
"@babel/core": "^7.2.2",
15-
"@babel/preset-env": "^7.2.3",
16-
"jest": "^24.0.0"
17-
},
1810
"jest": {
1911
"moduleFileExtensions": [
2012
"js",

e2e/__projects__/basic/package.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"devDependencies": {
1111
"babel-helper-vue-jsx-merge-props": "^2.0.3",
1212
"babel-plugin-syntax-jsx": "^6.18.0",
13-
"babel-plugin-transform-vue-jsx": "^3.7.0",
14-
"jest": "^24.0.0"
13+
"babel-plugin-transform-vue-jsx": "^3.7.0"
1514
},
1615
"jest": {
1716
"moduleFileExtensions": [
@@ -23,9 +22,6 @@
2322
"^.+\\.js$": "babel-jest",
2423
"^.+\\.vue$": "../../../lib/index.js"
2524
},
26-
"moduleNameMapper": {
27-
"^~?__styles/(.*)$": "<rootDir>/components/styles/$1"
28-
},
2925
"globals": {
3026
"vue-jest": {
3127
"pug": {

e2e/__projects__/custom-transformers/package.json

+1-12
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,9 @@
77
"scripts": {
88
"test": "jest --no-cache --coverage test.js"
99
},
10-
"dependencies": {
11-
"@vue/compiler-sfc": "3.0.0-alpha.10",
12-
"vue": "3.0.0-alpha.10"
13-
},
1410
"devDependencies": {
15-
"@babel/core": "^7.2.2",
16-
"@babel/preset-env": "^7.2.3",
17-
"jest": "^24.0.0",
1811
"postcss": "^7.0.13",
19-
"postcss-color-function": "^4.0.1",
20-
"sass": "^1.23.7"
12+
"postcss-color-function": "^4.0.1"
2113
},
2214
"jest": {
2315
"moduleFileExtensions": [
@@ -29,9 +21,6 @@
2921
"^.+\\.js$": "./babel-transformer.js",
3022
"^.+\\.vue$": "../../../lib"
3123
},
32-
"moduleNameMapper": {
33-
"^~?__styles/(.*)$": "<rootDir>/components/styles/$1"
34-
},
3524
"globals": {
3625
"vue-jest": {
3726
"transform": {

e2e/__projects__/style/package.json

+1-10
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,8 @@
77
"scripts": {
88
"test": "jest --no-cache test.js"
99
},
10-
"dependencies": {
11-
"@vue/compiler-sfc": "3.0.0-alpha.10",
12-
"vue": "3.0.0-alpha.10"
13-
},
1410
"devDependencies": {
15-
"@babel/core": "^7.2.2",
16-
"@babel/preset-env": "^7.2.3",
17-
"@vue/test-utils": "^1.0.0-beta.28",
18-
"jest": "^24.0.0",
19-
"postcss": "^7.0.13",
20-
"sass": "^1.23.7"
11+
"postcss": "^7.0.13"
2112
},
2213
"jest": {
2314
"moduleFileExtensions": [

e2e/test-runner.js

-14
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,6 @@ function runTest(dir) {
4444
run('yarn install --silent --no-lockfile')
4545
}
4646

47-
// For tests that need vue-jest to successfully `require.resolve()` a file in
48-
// the project directory's node_modules, we can't symlink vue-jest from a
49-
// parent directory (as node module resolution walks up the file tree,
50-
// starting from the realpath of the caller), we must copy it.
51-
if (
52-
!fs.existsSync(`${resolvedPath}/node_modules/vue-jest`) ||
53-
!fs.lstatSync(`${resolvedPath}/node_modules/vue-jest`).isSymbolicLink()
54-
) {
55-
log('Copying vue-jest into node_modules')
56-
fs.mkdirSync(`${resolvedPath}/node_modules/vue-jest`, { recursive: true })
57-
run(`cp ${cwd}/package.json node_modules/vue-jest/`)
58-
run(`cp -r ${cwd}/lib node_modules/vue-jest/`)
59-
}
60-
6147
log('Running tests')
6248
run('yarn test')
6349

0 commit comments

Comments
 (0)