Skip to content

Commit

Permalink
frontend: Add coverage testing to make test and CI
Browse files Browse the repository at this point in the history
The coverage percentages in package.json that the testing needs to
meet are the current levels.
  • Loading branch information
illume committed May 18, 2022
1 parent d3dc16b commit 2c2ef3a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build: install

.PHONY: test
test:
npm run test
npm run test -- --coverage

.PHONY: lint
lint:
Expand Down
21 changes: 20 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,24 @@
}
]
},
"prettier": "@kinvolk/eslint-config/prettier-config"
"prettier": "@kinvolk/eslint-config/prettier-config",
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
"!<rootDir>/node_modules/",
"!<rootDir>/build/",
"!src/**/*.stories*.{js,jsx,ts,tsx}"
],
"coverageThreshold": {
"global": {
"statements": 34.95,
"branches": 26.29,
"functions": 30.35,
"lines": 35.3
}
},
"coverageReporters": [
"text"
]
}
}

0 comments on commit 2c2ef3a

Please sign in to comment.