chore(web,server): run code coverage reports (#1313)

* chore(web,server): run code coverage reports

* chore(tests): fail test check if coverage drops

* chore: disable e2e until they are fixed

* chore(web): coverage threshold
This commit is contained in:
Jason Rasmussen
2023-01-12 17:07:57 -05:00
committed by GitHub
parent 6db541c89b
commit 755a1331da
6 changed files with 233 additions and 86 deletions

View File

@@ -20,10 +20,16 @@ export default {
// collectCoverage: false,
// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,
collectCoverageFrom: ['src/**/*.*', '!src/api/open-api/**'],
// The directory where Jest should output its coverage files
// coverageDirectory: undefined,
coverageThreshold: {
global: {
lines: 4,
statements: 4
}
},
// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
@@ -76,16 +82,7 @@ export default {
// ],
// An array of file extensions your modules use
// moduleFileExtensions: [
// "js",
// "mjs",
// "cjs",
// "jsx",
// "ts",
// "tsx",
// "json",
// "node"
// ],
moduleFileExtensions: ['svelte', 'js', 'ts'],
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {

View File

@@ -9,12 +9,13 @@
"check": "svelte-check --no-tsconfig --fail-on-warnings --ignore \"src/api/open-api\"",
"check:watch": "npm run check -- --watch",
"check:code": "npm run format && npm run lint && npm run check",
"check:all": "npm run check:code && npm test",
"check:all": "npm run check:code && npm run test:cov",
"lint": "eslint . --max-warnings 0",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --check --plugin-search-dir=. .",
"format:fix": "prettier --write --plugin-search-dir=. .",
"test": "jest",
"test:cov": "jest --coverage",
"test:watch": "npm test -- --watch"
},
"devDependencies": {