mirror of
https://github.com/zebrajr/express.git
synced 2026-01-15 12:15:27 +00:00
build: use nyc for test coverage
This commit is contained in:
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@@ -31,39 +31,39 @@ jobs:
|
||||
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"
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@ package-lock.json
|
||||
*.gz
|
||||
|
||||
# Coveralls
|
||||
.nyc_output
|
||||
coverage
|
||||
|
||||
# Benchmarking
|
||||
|
||||
12
appveyor.yml
12
appveyor.yml
@@ -59,6 +59,18 @@ install:
|
||||
} elseif ([int]$env:nodejs_version.split(".")[0] -lt 12) {
|
||||
npm install --silent --save-dev mocha@8.4.0
|
||||
}
|
||||
- ps: |
|
||||
# nyc for test coverage
|
||||
# - use 10.3.2 for Node.js < 4
|
||||
# - use 11.9.0 for Node.js < 6
|
||||
# - use 14.1.1 for Node.js < 8
|
||||
if ([int]$env:nodejs_version.split(".")[0] -lt 4) {
|
||||
npm install --silent --save-dev nyc@10.3.2
|
||||
} elseif ([int]$env:nodejs_version.split(".")[0] -lt 6) {
|
||||
npm install --silent --save-dev nyc@11.9.0
|
||||
} elseif ([int]$env:nodejs_version.split(".")[0] -lt 8) {
|
||||
npm install --silent --save-dev nyc@14.1.1
|
||||
}
|
||||
- ps: |
|
||||
# supertest for http calls
|
||||
# - use 2.0.0 for Node.js < 4
|
||||
|
||||
@@ -68,12 +68,12 @@
|
||||
"eslint": "7.32.0",
|
||||
"express-session": "1.17.2",
|
||||
"hbs": "4.2.0",
|
||||
"istanbul": "0.4.5",
|
||||
"marked": "0.7.0",
|
||||
"method-override": "3.0.0",
|
||||
"mocha": "9.2.0",
|
||||
"morgan": "1.10.0",
|
||||
"multiparty": "4.2.2",
|
||||
"nyc": "15.1.0",
|
||||
"pbkdf2-password": "1.2.1",
|
||||
"should": "13.2.3",
|
||||
"supertest": "6.2.2",
|
||||
@@ -92,8 +92,8 @@
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/",
|
||||
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/ test/acceptance/",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/ test/acceptance/",
|
||||
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
|
||||
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
||||
"test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user