Skip to content

Commit

Permalink
test(coverage): switch to nyc for coverage from both tests
Browse files Browse the repository at this point in the history
  • Loading branch information
10xLaCroixDrinker committed Nov 8, 2019
1 parent 5caf406 commit a625a24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ function invalidExtras(data, msg) {

function recordName(record) {
/* eslint no-underscore-dangle: 0 */
/* istanbul ignore next */
return record._name || record.constructor.name || 'Record';
}

Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"description": "Transit serialisation for Immutable.js",
"main": "index.js",
"scripts": {
"test": "npm install --no-save immutable@3 && mocha && npm install --no-save immutable@^4.0.0-rc.12 && mocha",
"test:3": "npm install --no-save immutable@^3.7.4 && mocha",
"test:4": "npm install --no-save immutable@^4.0.0-rc.12 && mocha",
"test": "npm run test:3 && npm run test:4",
"lint": "eslint .",
"coverage": "istanbul cover _mocha --"
"coverage": "nyc npm test && nyc report --reporter=lcov --reporter=json"
},
"repository": {
"type": "git",
Expand All @@ -28,8 +30,8 @@
"coveralls": "^2.11.2",
"eslint": "^0.24.1",
"immutable": ">=3.7.4",
"istanbul": "^0.3.14",
"mocha": "^2.2.5",
"nyc": "^14.1.1",
"transit-js": "^0.8.807"
}
}

0 comments on commit a625a24

Please sign in to comment.