Skip to content

Commit 52d7842

Browse files
committed
[test] Use nyc for coverage
1 parent 286d513 commit 52d7842

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
2+
.nyc_output/
23
coverage/
3-
npm-debug.log
44
.vscode/
5+
npm-debug.log

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ node_js:
55
- "7"
66
- "6"
77
- "4"
8-
script:
9-
- "npm run test-travis"
10-
after_script:
11-
- "npm install coveralls@2 && cat coverage/lcov.info | coveralls"
8+
after_success:
9+
- "npm install coveralls@2 && nyc report --reporter=text-lcov | coveralls"

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
"url": "git://github.com/websockets/ws.git"
1919
},
2020
"scripts": {
21-
"test-travis": "npm run lint && istanbul cover _mocha --report lcovonly -- test/*.test.js",
22-
"coverage": "istanbul cover _mocha --report html -- test/*.test.js",
23-
"integration": "npm run lint && mocha test/*.integration.js",
24-
"test": "npm run lint && mocha test/*.test.js",
21+
"test": "eslint . && nyc --reporter=html --reporter=text mocha test/*.test.js",
22+
"integration": "eslint . && mocha test/*.integration.js",
2523
"lint": "eslint ."
2624
},
2725
"dependencies": {
@@ -36,8 +34,8 @@
3634
"eslint-plugin-node": "~4.2.0",
3735
"eslint-plugin-promise": "~3.5.0",
3836
"eslint-plugin-standard": "~2.1.0",
39-
"istanbul": "~0.4.5",
4037
"mocha": "~3.2.0",
38+
"nyc": "~10.2.0",
4139
"utf-8-validate": "~3.0.0"
4240
}
4341
}

0 commit comments

Comments
 (0)