After upgrading to 26.4.3, test coverage reports began acting strangely. Sometimes they were empty and other times they only contained a few files. Rolling back to 26.4.1 fixed it without making any other changes. Re-installing 26.4.3 without making any other changes brought the problem back again.
# content of ts-jest.log :
{"context":{"fileName":"/Users/johnjordan/2c/growth-plans-statistics/src/common/service-crud.util.spec.ts","logLevel":20,"namespace":"ts-jest-transformer","package":"ts-jest","transformOptions":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/cy/8hdxsk4j73n6stv8z6t8lktc0000gn/T/jest_dx","clearMocks":false,"coveragePathIgnorePatterns":["node_modules",".args.ts",".input.ts",".dto.ts",".constants.ts",".factory.ts",".entity.ts"],"cwd":"/Users/johnjordan/2c/growth-plans-statistics","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"injectGlobals":true,"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"d4540e74ca94f518d2391666012842c7","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/johnjordan/2c/growth-plans-statistics/src","roots":["/Users/johnjordan/2c/growth-plans-statistics/src"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"slowTestThreshold":5,"snapshotSerializers":[],"testEnvironment":"/Users/johnjordan/2c/growth-plans-statistics/node_modules/jest-environment-node/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":["/node_modules/"],"testRegex":[".spec.ts$"],"testRunner":"/Users/johnjordan/2c/growth-plans-statistics/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.(t|j)s$","/Users/johnjordan/2c/growth-plans-statistics/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/","\\.pnp\\.[^\\/]+$"],"watchPathIgnorePatterns":[]},"instrument":false,"rootDir":"/Users/johnjordan/2c/growth-plans-statistics/src","supportsDynamicImport":false,"supportsStaticESM":false},"version":"26.4.3"},"message":"computing cache key for /Users/johnjordan/2c/growth-plans-statistics/src/common/service-crud.util.spec.ts","sequence":84,"time":"2020-10-28T05:09:49.799Z"}
System:
OS: macOS 10.15.6
Node version: v14.1.0
Npm packages:
jest: 26.6.1
ts-jest: 26.4.3
typescript: 4.0.5
babel(optional):
🐛 Bug Report
After upgrading to 26.4.3, test coverage reports began acting strangely. Sometimes they were empty and other times they only contained a few files. Rolling back to 26.4.1 fixed it without making any other changes. Re-installing 26.4.3 without making any other changes brought the problem back again.
To Reproduce
Install 26.4.3 and run tests with the
--coverageflag. Notice strange behavior where coverage report ignores most or all files.Expected behavior
Coverage reports include all expected files
Debug log:
envinfo