Skip to content

Commit dc285ab

Browse files
author
Kent C. Dodds
committed
add coverage 📺
1 parent e54c935 commit dc285ab

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
node_modules/
2+
.nyc_output/
3+
coverage/

‎package.json‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Get random Star Wars names",
55
"main": "src/index.js",
66
"scripts": {
7-
"test": "mocha",
7+
"test": "nyc mocha",
88
"watch:test": "mocha --watch",
99
"lint": "eslint src"
1010
},
@@ -29,6 +29,22 @@
2929
"chai": "3.5.0",
3030
"eslint": "3.2.0",
3131
"eslint-config-kentcdodds": "^9.0.0",
32-
"mocha": "3.0.0"
32+
"mocha": "3.0.0",
33+
"nyc": "7.1.0"
34+
},
35+
"nyc": {
36+
"all": true,
37+
"check-coverage": true,
38+
"branches": 100,
39+
"function": 100,
40+
"lines": 100,
41+
"statements": 100,
42+
"reporter": [
43+
"text",
44+
"lcov"
45+
],
46+
"include": [
47+
"src"
48+
]
3349
}
3450
}

0 commit comments

Comments
 (0)