Skip to content

Commit

Permalink
Fix the coverage script, and show coverage for all files in src (#362)
Browse files Browse the repository at this point in the history
Coverage script was broken after switch to jest. And running coverage should show test coverage for all files, not just those with .spec files.
  • Loading branch information
jenniferarnesen authored Oct 16, 2017
1 parent f902ccf commit d0ba697
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
setupTestFrameworkScriptFile: '<rootDir>/config/setup.js',
collectCoverageFrom: ['src/**/*.js'],
testPathIgnorePatterns: [
'/node_modules/',
'<rootDir>/lib/',
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"scripts": {
"prestart": "d2-manifest package.json manifest.webapp",
"start": "webpack-dev-server",
"coverage": "NODE_ENV=test nyc --include src --exclude 'src/**/*.spec.js' --require babel-register --require babel-polyfill --require ignore-styles mocha --reporter dot --require config/setup.js --recursive 'src/**/*.spec.js'",
"postcoverage": " nyc report --reporter=lcov",
"coverage": "npm test -- --coverage",
"test": "jest",
"test:watch": "yarn test -- --watch",
"prebuild": "yarn test",
Expand Down

0 comments on commit d0ba697

Please sign in to comment.