Skip to content

Commit a89e09b

Browse files
committed
Use nyc instead of isparta for coverage
1 parent 88ecfb0 commit a89e09b

File tree

4 files changed

+274
-262
lines changed

4 files changed

+274
-262
lines changed

.babelrc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,21 @@
33
[
44
"env",
55
{
6-
"targets": { "node": 4 }
6+
"targets": {
7+
"node": 4
8+
}
79
}
810
],
911
"flow"
1012
],
11-
"plugins": ["add-module-exports"]
13+
"plugins": [
14+
"add-module-exports"
15+
],
16+
"env": {
17+
"test": {
18+
"plugins": [
19+
"istanbul"
20+
]
21+
}
22+
}
1223
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ npm-debug.log
33
lib
44
*.svg.react.js
55
coverage
6-
.vscode
6+
.vscode
7+
.nyc_output

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@
2323
"scripts": {
2424
"build": "gulp build",
2525
"clean": "rm -rf lib",
26-
"cover": "babel-node `npm bin`/isparta cover test/index.js",
26+
"cover": "NODE_ENV=test nyc --reporter=lcov yarn test",
2727
"eslint": "eslint .",
2828
"flow": "flow",
2929
"lint": "yarn flow && yarn eslint",
30-
"test": "tape -r babel-register test/index.js | faucet",
30+
"test": "NODE_ENV=test tape -r babel-register test/index.js | faucet",
3131
"watch": "gulp watch"
3232
},
3333
"devDependencies": {
3434
"babel-cli": "^6.24.1",
3535
"babel-eslint": "^8.0.1",
3636
"babel-plugin-add-module-exports": "^0.2.1",
37+
"babel-plugin-istanbul": "^4.1.5",
3738
"babel-preset-env": "^1.6.0",
3839
"babel-preset-flow": "^6.23.0",
3940
"babel-register": "^6.24.1",
@@ -48,8 +49,8 @@
4849
"gulp-babel": "^7.0.0",
4950
"gulp-newer": "^1.3.0",
5051
"gulp-util": "^3.0.8",
51-
"isparta": "^4.0.0",
5252
"lerna": "^2.4.0",
53+
"nyc": "^11.2.1",
5354
"prettier": "^1.7.2",
5455
"react": "^16.0.0",
5556
"react-dom": "^16.0.0",

0 commit comments

Comments
 (0)