My coverage settings create a coverage folder but doesn't create a coverage synopsis on the terminal at the end of the run. How do I get both the full coverage folder and the synopsis on the CLI?
// jest.config.ts
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
clearMocks: true,
moduleFileExtensions: ["js", "ts", "json", "node"],
roots: ["./"],
testMatch: ["./**/*.test.ts"],
preset: "ts-jest",
testEnvironment: "node",
runInBand: true,
detectOpenHandles: true,
testTimeout:20000,
forceExit: true,
verbose: true,
json: true,
outputFile: "./test-log/jest-log.json",
transform: {
"^.+\\.ts?$": "ts-jest",
},
transformIgnorePatterns: [
"./node_modules/",
"./dist/",
"./files/",
"./public/",
],
extensionsToTreatAsEsm: [".ts"],
globals: {
"ts-jest": {
tsconfig: "./tsconfig.json",
useESM: true,
},
},
collectCoverage: true,
collectCoverageFrom: ["./src/**"],
coverageThreshold: {
global: {
lines: 30
}
},
coverageReporters: ["json", "html"],
};
//package.json test script
"test": "npm run clear && cross-env-shell TS_JEST_LOG=test-log/ts-jest.log NODE_OPTIONS=--experimental-vm-modules jest",