Skip to content

Commit a00c9dd

Browse files
authored
Merge pull request #141 from CheckmarxDev/feature/AST-13070-coverage
added coverage
2 parents 75d3668 + 17191be commit a00c9dd

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

jest.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,16 @@ module.exports = {
4040
// setupFiles: [`${__dirname}/setup/setup.js`],
4141
// setupFilesAfterEnv: [`${__dirname}/setup/setupAfterEnv.ts`],
4242
// coverage settings
43-
collectCoverage: NO_COVERAGE === false,
44-
collectCoverageFrom: NO_COVERAGE ? [] : ['**/*.{ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
43+
collectCoverage: true,
44+
collectCoverageFrom: ['**/*.{ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
45+
coverageThreshold: {
46+
"global": {
47+
"branches": 70,
48+
"functions": 90,
49+
"lines": 90,
50+
"statements": 90
51+
}
52+
},
4553
coveragePathIgnorePatterns: ['/node_modules/', '\\.json$', '/__tests__/', '/stories/', '/\\.storybook/'],
4654

4755
globals: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"scripts": {
1515
"build": "tsc",
1616
"postbuild": "copyfiles -u 1 src/main/wrapper/resources/cx* dist/",
17-
"test": "tsc && jest --runInBand"
17+
"test": "tsc && jest --runInBand --coverage"
1818
},
1919
"repository": "https://github.com/CheckmarxDev/ast-cli-javascript-wrapper.git",
2020
"author": "Jay Nanduri",

0 commit comments

Comments
 (0)