Skip to content

Commit

Permalink
investigate consistent coverage numbers (#98)
Browse files Browse the repository at this point in the history
outcome: coverage numbers are only consistent when using `--runInBand`. fortunately the false coverage numbers seem to always be higher than the "real" numbers.

* delegate the coverage work to test:coverage script

* remove test:record and test:update script. not needed
  • Loading branch information
rlindner81 authored Dec 14, 2024
1 parent 3578924 commit 12165cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
coverageProvider: "v8",

// A list of reporter names that Jest uses when writing coverage reports
coverageReporters: [],
coverageReporters: ["text-summary"],

// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
"prepublishOnly": "npm ci --package-lock --omit=dev && npx shx rm package-lock.json && npm shrinkwrap",
"patch": "npx patch-package",
"test": "jest",
"test:coverage": "jest --coverageReporters=html",
"test:coverage": "jest --runInBand --coverageReporters=html --coverageReporters=text-summary",
"test:remove-inline-snapshots": "npx replace '\\.toMatchInlineSnapshot\\(\\s*`[\\s\\S]*?`\\s*\\);' '.toMatchInlineSnapshot();' test -r --include='*.test.js'",
"test:record": "npm run test:record:reg && npm run test:record:cds && npm run test:record:hdi",
"test:update": "jest --updateSnapshot",
"test:record:reg": "jest --runInBand --config jest-nock-record.config.js test-nock-record/tenantRegistry.nock.test.js",
"test:record:cds": "jest --runInBand --config jest-nock-record.config.js test-nock-record/capMultitenancy.nock.test.js",
"test:record:hdi": "jest --runInBand --config jest-nock-record.config.js test-nock-record/hanaManagement.nock.test.js",
Expand Down

0 comments on commit 12165cf

Please sign in to comment.