Skip to content

Commit

Permalink
Fix nyc test code coverage reporting (reduxjs#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdfriedmann authored and josepot committed Sep 21, 2018
1 parent fddb4eb commit 5dc47ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
],
"env": {
"test": {
"plugins": ["istanbul"]
"plugins": [
"istanbul",
["transform-es2015-modules-commonjs", { "loose": true }]
]
},
"commonjs": {
"plugins": [
Expand Down
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"clean": "rimraf lib dist es coverage",
"lint": "eslint src test",
"prepare": "npm run clean && npm run build",
"test": "cross-env BABEL_ENV=commonjs NODE_ENV=test mocha --compilers js:babel-register --recursive --require ./test/setup.js",
"test": "cross-env BABEL_ENV=test NODE_ENV=test mocha --compilers js:babel-register --recursive --require ./test/setup.js",
"test:watch": "npm test -- --watch",
"test:cov": "cross-env NODE_ENV=test nyc npm test",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
Expand Down Expand Up @@ -118,7 +118,14 @@
]
},
"nyc": {
"require": [
"babel-register"
],
"all": "true",
"sourceMap": false,
"instrument": false
"instrument": false,
"include": [
"src/**/*.js"
]
}
}

0 comments on commit 5dc47ff

Please sign in to comment.