Skip to content

Commit d6a4b49

Browse files
committed
test: add jest config for coverage
1 parent 4c2d223 commit d6a4b49

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
node_modules
33
package-lock.json
44
/dist
5+
/coverage
56

67
/tests/e2e/reports/
78
selenium-debug.log

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## [vue](./README.md) version `changelog`
22

3+
##### `v2.0.0-next`
4+
- test(unit): add test for User.vue
5+
- test: add jest config for coverage
6+
37
##### `v2.0.0-rc.0`
48
- test(unit): add some views testing
59
- test(e2e): add testing for mobile `sidebar-show`

jest.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,11 @@ module.exports = {
2121
'<rootDir>/tests/unit/Dashboard.spec.js'
2222
],
2323
verbose: true,
24-
testURL: "http://localhost/"
24+
testURL: "http://localhost/",
25+
collectCoverage: true,
26+
collectCoverageFrom: [
27+
"src/**/*.{js,vue}",
28+
"!**/node_modules/**"
29+
],
30+
coverageReporters: ["html", "text-summary"]
2531
}

0 commit comments

Comments
 (0)