build: use nyc for test coverage
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 884657d · Browse files · 4 files·+25 added−12 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+25 added−12 removed
- other:+25 added−12 removed
Provenance
- Commit
12310c5- Tree
d90da53- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent
884657d
4 files changed+25 added−12 removed
modified:.github/workflows/ci.yml+9 added-9 removed
29 unmodified lines303132333434353637383839404142424344454646474849505051525354545556575858596061626263646566666768697091 unmodified lines29 unmodified lines
include: - name: Node.js 0.10 node-version: "0.10" npm-i: minimatch@3.0.4 mocha@3.5.3 supertest@2.0.0 npm-i: minimatch@3.0.4 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0
- name: Node.js 0.12 node-version: "0.12" npm-i: minimatch@3.0.4 mocha@3.5.3 supertest@2.0.0 npm-i: minimatch@3.0.4 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0
- name: io.js 1.x node-version: "1.8" npm-i: minimatch@3.0.4 mocha@3.5.3 supertest@2.0.0 npm-i: minimatch@3.0.4 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0
- name: io.js 2.x node-version: "2.5" npm-i: minimatch@3.0.4 mocha@3.5.3 supertest@2.0.0 npm-i: minimatch@3.0.4 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0
- name: io.js 3.x node-version: "3.3" npm-i: minimatch@3.0.4 mocha@3.5.3 supertest@2.0.0 npm-i: minimatch@3.0.4 mocha@3.5.3 nyc@10.3.2 supertest@2.0.0
- name: Node.js 4.x node-version: "4.9" npm-i: mocha@5.2.0 supertest@3.4.2 npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2
- name: Node.js 5.x node-version: "5.12" npm-i: mocha@5.2.0 supertest@3.4.2 npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2
- name: Node.js 6.x node-version: "6.17" npm-i: mocha@6.2.2 supertest@6.1.6 npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6
- name: Node.js 7.x node-version: "7.10" npm-i: mocha@6.2.2 supertest@6.1.6 npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6
- name: Node.js 8.x node-version: "8.17" npm-i: mocha@7.2.091 unmodified linesmodified:.gitignore+1 added
3 unmodified lines4 *.log5 *.gz6 7 # Coveralls8+.nyc_output9 coverage10 11 # Benchmarking12 benchmarks/graphs3 unmodified linesmodified:appveyor.yml+12 added
58 unmodified lines59 } elseif ([int]$env:nodejs_version.split(".")[0] -lt 12) {60 npm install --silent --save-dev mocha@8.4.061 }62 - ps: |63+ # nyc for test coverage64+ # - use 10.3.2 for Node.js < 465+ # - use 11.9.0 for Node.js < 666+ # - use 14.1.1 for Node.js < 867+ if ([int]$env:nodejs_version.split(".")[0] -lt 4) {68+ npm install --silent --save-dev nyc@10.3.269+ } elseif ([int]$env:nodejs_version.split(".")[0] -lt 6) {70+ npm install --silent --save-dev nyc@11.9.071+ } elseif ([int]$env:nodejs_version.split(".")[0] -lt 8) {72+ npm install --silent --save-dev nyc@14.1.173+ }74+ - ps: |75 # supertest for http calls76 # - use 2.0.0 for Node.js < 477 # - use 3.4.2 for Node.js < 678 # - use 6.1.6 for Node.js < 825 unmodified linesmodified:package.json+3 added-3 removed
66 unmodified lines67 "ejs": "3.1.6",68 "eslint": "7.32.0",69 "express-session": "1.17.2",70 "hbs": "4.2.0",71- "istanbul": "0.4.5",71 "marked": "0.7.0",72 "method-override": "3.0.0",73 "mocha": "9.2.0",74 "morgan": "1.10.0",75 "multiparty": "4.2.2",76+ "nyc": "15.1.0",77 "pbkdf2-password": "1.2.1",78 "should": "13.2.3",79 "supertest": "6.2.2",80 "vhost": "~3.0.2"10 unmodified lines91 ],92 "scripts": {93 "lint": "eslint .",94 "test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/",95- "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/ test/acceptance/",96- "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/ test/acceptance/",95+ "test-ci": "nyc --reporter=lcovonly --reporter=text npm test",96+ "test-cov": "nyc --reporter=html --reporter=text npm test",97 "test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/"98 }99 }