Skip to content

Commit f9273c7

Browse files
committedNov 16, 2021
build: use nyc for coverage testing
1 parent 311a1a5 commit f9273c7

File tree

3 files changed

+17
-73
lines changed

3 files changed

+17
-73
lines changed
 

‎.github/workflows/ci.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -34,43 +34,43 @@ jobs:
3434
- name: Node.js 0.8
3535
node-version: "0.8"
3636
npm-i: mocha@2.5.3
37-
npm-rm: istanbul
37+
npm-rm: nyc
3838

3939
- name: Node.js 0.10
4040
node-version: "0.10"
41-
npm-i: mocha@2.5.3
41+
npm-i: mocha@2.5.3 nyc@10.3.2
4242

4343
- name: Node.js 0.12
4444
node-version: "0.12"
45-
npm-i: mocha@3.5.3
45+
npm-i: mocha@3.5.3 nyc@10.3.2
4646

4747
- name: io.js 1.x
4848
node-version: "1.8"
49-
npm-i: mocha@3.5.3
49+
npm-i: mocha@3.5.3 nyc@10.3.2
5050

5151
- name: io.js 2.x
5252
node-version: "2.5"
53-
npm-i: mocha@3.5.3
53+
npm-i: mocha@3.5.3 nyc@10.3.2
5454

5555
- name: io.js 3.x
5656
node-version: "3.3"
57-
npm-i: mocha@3.5.3
57+
npm-i: mocha@3.5.3 nyc@10.3.2
5858

5959
- name: Node.js 4.x
6060
node-version: "4.9"
61-
npm-i: mocha@5.2.0
61+
npm-i: mocha@5.2.0 nyc@11.9.0
6262

6363
- name: Node.js 5.x
6464
node-version: "5.12"
65-
npm-i: mocha@5.2.0
65+
npm-i: mocha@5.2.0 nyc@11.9.0
6666

6767
- name: Node.js 6.x
6868
node-version: "6.17"
69-
npm-i: mocha@6.2.2
69+
npm-i: mocha@6.2.2 nyc@14.1.1
7070

7171
- name: Node.js 7.x
7272
node-version: "7.10"
73-
npm-i: mocha@6.2.2
73+
npm-i: mocha@6.2.2 nyc@14.1.1
7474

7575
- name: Node.js 8.x
7676
node-version: "8.17"
@@ -156,7 +156,7 @@ jobs:
156156
- name: Run tests
157157
shell: bash
158158
run: |
159-
if npm -ps ls istanbul | grep -q istanbul; then
159+
if npm -ps ls nyc | grep -q nyc; then
160160
npm run test-ci
161161
else
162162
npm test
@@ -168,7 +168,7 @@ jobs:
168168

169169
- name: Collect code coverage
170170
uses: coverallsapp/github-action@master
171-
if: steps.list_env.outputs.istanbul != ''
171+
if: steps.list_env.outputs.nyc != ''
172172
with:
173173
github-token: ${{ secrets.GITHUB_TOKEN }}
174174
flag-name: run-${{ matrix.test_number }}

‎.gitignore

+2-58
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,6 @@
1-
# Compiled source #
2-
###################
3-
*.com
4-
*.class
5-
*.dll
6-
*.exe
7-
*.o
8-
*.so
9-
10-
# Packages #
11-
############
12-
# it's better to unpack these files and commit the raw source
13-
# git has its own built in compression methods
14-
*.7z
15-
*.dmg
16-
*.gz
17-
*.iso
18-
*.jar
19-
*.rar
20-
*.tar
21-
*.zip
22-
23-
# Logs and databases #
24-
######################
25-
*.log
26-
*.sql
27-
*.sqlite
28-
29-
# OS generated files #
30-
######################
31-
.DS_Store*
32-
ehthumbs.db
33-
Icon?
34-
Thumbs.db
35-
36-
# Node.js #
37-
###########
38-
lib-cov
39-
*.seed
40-
*.log
41-
*.csv
42-
*.dat
43-
*.out
44-
*.pid
45-
*.gz
46-
47-
pids
48-
logs
49-
results
50-
1+
*.tgz
2+
.nyc_output
513
coverage
524
node_modules
535
npm-debug.log
546
package-lock.json
55-
56-
# Components #
57-
##############
58-
59-
/build
60-
/components
61-
/vendors
62-
*.orig

‎package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"eslint-plugin-node": "11.1.0",
2525
"eslint-plugin-promise": "4.3.1",
2626
"eslint-plugin-standard": "4.1.0",
27-
"istanbul": "0.4.5",
2827
"mocha": "9.1.3",
28+
"nyc": "15.1.0",
2929
"readable-stream": "2.3.7",
3030
"safe-buffer": "5.2.1"
3131
},
@@ -42,7 +42,7 @@
4242
"scripts": {
4343
"lint": "eslint .",
4444
"test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/",
45-
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/",
46-
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/"
45+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
46+
"test-cov": "nyc --reporter=html --reporter=text npm test"
4747
}
4848
}

0 commit comments

Comments
 (0)
Please sign in to comment.