Skip to content

Commit 5ef504c

Browse files
committed
build: use nyc for test coverage
1 parent 9571736 commit 5ef504c

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

.github/workflows/ci.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -36,51 +36,51 @@ jobs:
3636
- name: Node.js 0.8
3737
node-version: "0.8"
3838
39-
npm-rm: beautify-benchmark benchmark fast-url-parser istanbul
39+
npm-rm: beautify-benchmark benchmark fast-url-parser nyc
4040

4141
- name: Node.js 0.10
4242
node-version: "0.10"
43-
43+
4444
npm-rm: beautify-benchmark benchmark fast-url-parser
4545

4646
- name: Node.js 0.12
4747
node-version: "0.12"
48-
48+
4949
npm-rm: beautify-benchmark benchmark fast-url-parser
5050

5151
- name: io.js 1.x
5252
node-version: "1.8"
53-
53+
5454
npm-rm: beautify-benchmark benchmark fast-url-parser
5555

5656
- name: io.js 2.x
5757
node-version: "2.5"
58-
58+
5959
npm-rm: beautify-benchmark benchmark fast-url-parser
6060

6161
- name: io.js 3.x
6262
node-version: "3.3"
63-
63+
6464
npm-rm: beautify-benchmark benchmark fast-url-parser
6565

6666
- name: Node.js 4.x
6767
node-version: "4.9"
68-
68+
6969
npm-rm: beautify-benchmark benchmark fast-url-parser
7070

7171
- name: Node.js 5.x
7272
node-version: "5.12"
73-
73+
7474
npm-rm: beautify-benchmark benchmark fast-url-parser
7575

7676
- name: Node.js 6.x
7777
node-version: "6.17"
78-
78+
7979
npm-rm: beautify-benchmark benchmark fast-url-parser
8080

8181
- name: Node.js 7.x
8282
node-version: "7.10"
83-
83+
8484
npm-rm: beautify-benchmark benchmark fast-url-parser
8585

8686
- name: Node.js 8.x
@@ -186,7 +186,7 @@ jobs:
186186
- name: Run tests
187187
shell: bash
188188
run: |
189-
if npm -ps ls istanbul | grep -q istanbul; then
189+
if npm -ps ls nyc | grep -q nyc; then
190190
npm run test-ci
191191
else
192192
npm test
@@ -198,7 +198,7 @@ jobs:
198198

199199
- name: Collect code coverage
200200
uses: coverallsapp/github-action@master
201-
if: steps.list_env.outputs.istanbul != ''
201+
if: steps.list_env.outputs.nyc != ''
202202
with:
203203
github-token: ${{ secrets.GITHUB_TOKEN }}
204204
flag-name: run-${{ matrix.test_number }}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.DS_Store*
1+
.nyc_output
22
coverage
33
node_modules
44
npm-debug.log

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"eslint-plugin-promise": "6.1.1",
1919
"eslint-plugin-standard": "4.1.0",
2020
"fast-url-parser": "1.1.3",
21-
"istanbul": "0.4.5",
22-
"mocha": "10.2.0"
21+
"mocha": "10.2.0",
22+
"nyc": "15.1.0"
2323
},
2424
"files": [
2525
"LICENSE",
@@ -34,7 +34,7 @@
3434
"bench": "node benchmark/index.js",
3535
"lint": "eslint .",
3636
"test": "mocha --check-leaks --bail --reporter spec test/",
37-
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/",
38-
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/"
37+
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
38+
"test-cov": "nyc --reporter=html --reporter=text npm test"
3939
}
4040
}

0 commit comments

Comments
 (0)