Skip to content

Commit

Permalink
fix: code coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Apr 6, 2024
1 parent 9a16a54 commit 21a5c26
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ wwwroot/*.js
node_modules
typings
dist
tests/coverage
coverage


# IDEs
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"scripts": {
"build": "tsc --outDir dist/",
"prepublishOnly": "rm -rf dist/ && npm run build",
"test": "jest --coverage --config ./tests/jest.config.js",
"test": "jest --config ./tests/jest.config.js",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix"
},
Expand Down
18 changes: 14 additions & 4 deletions tests/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
module.exports = {
collectCoverage: true,
coverageReporters: ['text', 'cobertura'],
testEnvironment: "node",
preset: "ts-jest",
coveragePathIgnorePatterns: ["/node_modules/", "/tests/"],
rootDir: "../",
testEnvironment: "node",
moduleFileExtensions: ["js", "d.ts", "ts", "json"],
collectCoverage: true,
coverageReporters: ["text", "cobertura", "lcov"],
collectCoverageFrom: [
"**/**.{ts,tsx,js,jsx}",
"!**/**.d.ts",
"!**/**.eslintrc.js",
"!**/coverage/**",
"!**/dist/**",
"!**/example/**",
"!**/node_modules/**",
"!**/tests/**",
],
};

0 comments on commit 21a5c26

Please sign in to comment.