Skip to content

Commit 2228394

Browse files
committed
build: use nyc for test coverage
1 parent 020e3a5 commit 2228394

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,41 +34,43 @@ jobs:
3434
- name: Node.js 0.8
3535
node-version: "0.8"
3636
37-
npm-rm: istanbul
37+
npm-rm: nyc
3838

3939
- name: Node.js 0.10
4040
node-version: "0.10"
41-
41+
4242

4343
- name: Node.js 0.12
4444
node-version: "0.12"
45-
45+
4646

4747
- name: io.js 1.x
4848
node-version: "1.8"
49-
49+
5050

5151
- name: io.js 2.x
5252
node-version: "2.5"
53-
53+
5454

5555
- name: io.js 3.x
5656
node-version: "3.3"
57-
57+
5858

5959
- name: Node.js 4.x
6060
node-version: "4.9"
61-
61+
6262

6363
- name: Node.js 5.x
6464
node-version: "5.12"
65-
65+
6666

6767
- name: Node.js 6.x
6868
node-version: "6.17"
69+
6970

7071
- name: Node.js 7.x
7172
node-version: "7.10"
73+
7274

7375
- name: Node.js 8.x
7476
node-version: "8.16"
@@ -150,7 +152,7 @@ jobs:
150152
- name: Run tests
151153
shell: bash
152154
run: |
153-
if npm -ps ls istanbul | grep -q istanbul; then
155+
if npm -ps ls nyc | grep -q nyc; then
154156
npm run test-ci
155157
else
156158
npm test
@@ -162,7 +164,7 @@ jobs:
162164

163165
- name: Collect code coverage
164166
uses: coverallsapp/github-action@master
165-
if: steps.list_env.outputs.istanbul != ''
167+
if: steps.list_env.outputs.nyc != ''
166168
with:
167169
github-token: ${{ secrets.GITHUB_TOKEN }}
168170
flag-name: run-${{ matrix.test_number }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.nyc_output/
12
coverage
23
node_modules
34
npm-debug.log

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"eslint-plugin-node": "9.2.0",
2727
"eslint-plugin-promise": "4.2.1",
2828
"eslint-plugin-standard": "4.0.1",
29-
"istanbul": "0.4.5",
3029
"mocha": "6.2.3",
30+
"nyc": "15.1.0",
3131
"supertest": "4.0.2"
3232
},
3333
"files": [
@@ -41,7 +41,7 @@
4141
"scripts": {
4242
"lint": "eslint --plugin markdown --ext js,md .",
4343
"test": "mocha --check-leaks --reporter spec --bail",
44-
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec",
45-
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot"
44+
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
45+
"test-cov": "nyc --reporter=html --reporter=text npm test"
4646
}
4747
}

0 commit comments

Comments
 (0)