Skip to content

Commit 2def61d

Browse files
committed
build: use nyc for coverage testing
1 parent fdffa27 commit 2def61d

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,43 +35,43 @@ jobs:
3535
- name: Node.js 0.8
3636
node-version: "0.8"
3737
38-
npm-rm: istanbul
38+
npm-rm: nyc
3939

4040
- name: Node.js 0.10
4141
node-version: "0.10"
42-
42+
4343

4444
- name: Node.js 0.12
4545
node-version: "0.12"
46-
46+
4747

4848
- name: io.js 1.x
4949
node-version: "1.8"
50-
50+
5151

5252
- name: io.js 2.x
5353
node-version: "2.5"
54-
54+
5555

5656
- name: io.js 3.x
5757
node-version: "3.3"
58-
58+
5959

6060
- name: Node.js 4.x
6161
node-version: "4.9"
62-
62+
6363

6464
- name: Node.js 5.x
6565
node-version: "5.12"
66-
66+
6767

6868
- name: Node.js 6.x
6969
node-version: "6.17"
70-
70+
7171

7272
- name: Node.js 7.x
7373
node-version: "7.10"
74-
74+
7575

7676
- name: Node.js 8.x
7777
node-version: "8.16"
@@ -160,7 +160,7 @@ jobs:
160160
- name: Run tests
161161
shell: bash
162162
run: |
163-
if npm -ps ls istanbul | grep -q istanbul; then
163+
if npm -ps ls nyc | grep -q nyc; then
164164
npm run test-ci
165165
else
166166
npm test
@@ -172,7 +172,7 @@ jobs:
172172

173173
- name: Collect code coverage
174174
uses: coverallsapp/github-action@master
175-
if: steps.list_env.outputs.istanbul != ''
175+
if: steps.list_env.outputs.nyc != ''
176176
with:
177177
github-token: ${{ secrets.GITHUB_TOKEN }}
178178
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

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ install:
3333
# Remove all non-test dependencies
3434
- ps: |
3535
# Remove coverage dependency
36-
npm rm --silent --save-dev istanbul
36+
npm rm --silent --save-dev nyc
3737
# Remove lint dependencies
3838
cmd.exe /c "node -pe `"Object.keys(require('./package').devDependencies).join('\n')`"" | `
3939
sls "^eslint(-|$)" | `

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"eslint-plugin-node": "11.1.0",
2020
"eslint-plugin-promise": "5.1.1",
2121
"eslint-plugin-standard": "4.1.0",
22-
"istanbul": "0.4.5",
2322
"mocha": "9.1.3",
23+
"nyc": "15.1.0",
2424
"safe-buffer": "5.2.1",
2525
"supertest": "6.1.6"
2626
},
@@ -35,8 +35,8 @@
3535
"scripts": {
3636
"lint": "eslint .",
3737
"test": "mocha --reporter spec --bail --check-leaks test/",
38-
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
39-
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
38+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
39+
"test-cov": "nyc --reporter=html --reporter=text npm test",
4040
"version": "node scripts/version-history.js && git add HISTORY.md"
4141
}
4242
}

0 commit comments

Comments
 (0)