Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 5229cc0

Browse files
committed
Add sourcemaps to code coverage reports
- Switch to nyc - Update thresholds
1 parent a81bfdd commit 5229cc0

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ pids
1111
# Directory for instrumented libs generated by jscoverage/JSCover
1212
lib-cov
1313

14-
# Coverage directory used by tools like istanbul
14+
# Coverage directories used by tools like nyc
1515
coverage
16+
.nyc_output
1617

1718
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
1819
.grunt

.istanbul.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.nycrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"lines": 90,
3+
"functions": 55,
4+
"branches": 66,
5+
"statements": 91,
6+
"reporter": [
7+
"html",
8+
"text-summary"
9+
],
10+
"require": [
11+
"babel-register"
12+
],
13+
"exclude": [
14+
"test"
15+
],
16+
"check-coverage": true
17+
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"main": "lib/index.js",
66
"scripts": {
77
"prepublish": "not-in-publish || safe-publish-latest && npm run build",
8-
"build": "rimraf lib && babel src -d lib",
8+
"build": "rimraf lib && babel --source-maps inline src -d lib",
99
"lint": "eslint src test",
1010
"pretest": "npm run --silent lint",
1111
"test": "npm run build && npm run test:coverage && npm run --silent cover:check",
1212
"tests-only": "npm run build && npm run test:quick",
13-
"test:coverage": "babel-node node_modules/.bin/istanbul cover --report html node_modules/.bin/_mocha -- -R tap test/init.js test/*-test.js",
14-
"cover:check": "istanbul check-coverage && echo code coverage thresholds met, achievement unlocked!",
13+
"test:coverage": "nyc --silent node_modules/.bin/mocha -R tap test/init.js test/*-test.js",
14+
"cover:check": "nyc report && echo code coverage thresholds met, achievement unlocked!",
1515
"test:quick": "babel-node node_modules/.bin/_mocha -R tap test/init.js test/*-test.js"
1616
},
1717
"repository": {
@@ -50,11 +50,11 @@
5050
"eslint-config-airbnb-base": "^11.2.0",
5151
"eslint-plugin-import": "^2.2.0",
5252
"in-publish": "^2.0.0",
53-
"istanbul": "^1.0.0-alpha.2",
5453
"mocha": "^3.4.1",
5554
"mocha-wrap": "^2.1.1",
5655
"rimraf": "^2.6.1",
5756
"safe-publish-latest": "^1.1.1",
57+
"nyc": "^10.3.2",
5858
"sinon": "^1.17.7",
5959
"sinon-sandbox": "^1.0.2"
6060
},

0 commit comments

Comments
 (0)