Skip to content

Commit 65a0cb8

Browse files
committed
Migrate tests to use Jest 🚀
1 parent 8848669 commit 65a0cb8

16 files changed

+10084
-7285
lines changed

.babelrc

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
2-
"presets": ["es2015", "stage-2"],
3-
"plugins": [
4-
"transform-es2015-destructuring",
5-
"transform-object-rest-spread"
6-
],
7-
"comments": false,
2+
"presets": ["@vue/app"],
83
"env": {
94
"test": {
10-
"plugins": [ "istanbul" ]
5+
"presets": [
6+
[
7+
"@vue/app",
8+
{
9+
"modules": "commonjs"
10+
}
11+
]
12+
]
1113
}
1214
}
1315
}

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
node_modules/
33
npm-debug.log
44
selenium-debug.log
5-
test/unit/coverage
6-
test/e2e/reports
5+
tests/unit/coverage
6+
tests/e2e/reports
77
.editorconfig
88
.tern-project

jest.config.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
testMatch: ['**/?(*.)(spec).js?(x)'],
23
moduleFileExtensions: [
34
'js',
45
'jsx',
@@ -14,5 +15,12 @@ module.exports = {
1415
},
1516
snapshotSerializers: [
1617
'jest-serializer-vue'
18+
],
19+
coverageDirectory: '<rootDir>/test/unit/coverage',
20+
collectCoverageFrom: [
21+
'src/*.{js,vue}',
22+
'!**/node_modules/**',
23+
'!documentation/**',
24+
'!docs/**'
1725
]
18-
}
26+
}

0 commit comments

Comments
 (0)