Skip to content

Commit 01bd33b

Browse files
thomaslombartBelco90
authored andcommitted
test: enforce 100% coverage on CI (#37)
1 parent b38689c commit 01bd33b

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
module.exports = {
22
testMatch: ['**/tests/**/*.js'],
3+
coverageThreshold: {
4+
global: {
5+
branches: 100,
6+
functions: 100,
7+
lines: 100,
8+
statements: 100,
9+
},
10+
},
311
};

package-lock.json

Lines changed: 53 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"lint": "eslint ./",
2929
"lint:fix": "npm run lint -- --fix",
3030
"format": "prettier --write README.md {lib,docs,tests}/**/*.{js,md}",
31-
"test": "jest",
31+
"test:local": "jest",
32+
"test:ci": "jest --coverage",
33+
"test": "is-ci test:ci test:local",
3234
"semantic-release": "semantic-release"
3335
},
3436
"dependencies": {},
@@ -46,6 +48,7 @@
4648
"eslint-plugin-promise": "^4.2.1",
4749
"eslint-plugin-standard": "^4.0.1",
4850
"husky": "^3.0.5",
51+
"is-ci-cli": "^2.0.0",
4952
"jest": "^24.9.0",
5053
"lint-staged": "^9.2.5",
5154
"prettier": "1.18.2",

0 commit comments

Comments
 (0)