Skip to content

Commit

Permalink
Configure jest options for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hagopj13 committed Nov 2, 2019
1 parent 2d9ef3f commit 0f0b56b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
module.exports = {
testEnvironment: 'node',
testEnvironmentOptions: {
NODE_ENV: 'test',
},
restoreMocks: true,
coveragePathIgnorePatterns: ['node_modules', 'src/config', 'src/app.js', 'tests'],
coverageReporters: ['text', 'lcov', 'clover', 'html'],
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"scripts": {
"start": "pm2 start ecosystem.config.json --no-daemon",
"dev": "cross-env NODE_ENV=development nodemon src/index.js",
"test": "cross-env NODE_ENV=test jest tests -i",
"test:watch": "cross-env NODE_ENV=test jest tests -i --watchAll",
"test": "jest -i",
"test:watch": "jest -i --watchAll",
"coverage": "jest -i --coverage",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prettier": "prettier --check **/*.js",
Expand Down

0 comments on commit 0f0b56b

Please sign in to comment.