Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Line under a decorator is not marked as covered #4538

Closed
srinesha opened this issue Sep 4, 2024 · 2 comments
Closed

[Bug]: Line under a decorator is not marked as covered #4538

srinesha opened this issue Sep 4, 2024 · 2 comments
Labels

Comments

@srinesha
Copy link

srinesha commented Sep 4, 2024

Version

29.2.5

Steps to reproduce

  1. Create a decorator with JavaScript stage 3 decorator features. (No experimentalDecorators or emitDecoratorMetadata needed)
  2. Add a test to decorated function
  3. Run the test with coverage report

Expected behavior

Coverage report should cover 100% of the code in every category

Actual behavior

Coverage report leave the line below the decorator as uncovered line.

image

image

Debug log

{"context":{"call":null,"logLevel":10,"namespace":"ts:serviceHost","package":"ts-jest","version":"29.2.5"},"message":"readFile","sequence":430,"time":"2024-09-04T17:35:54.788Z"}
{"context":{"fileName":"/home/s1n7ax/Workspace/decorator-issue/__tests__/app.test.ts","logLevel":20,"namespace":"ts-jest-transformer","package":"ts-jest","transformOptions":{"cacheFS":{},"collectCoverage":true,"collectCoverageFrom":["./src/**/*","!./src/server.ts"],"config":{"automock":false,"cache":true,"cacheDirectory":"/tmp/jest_rs","clearMocks":false,"collectCoverageFrom":["./src/**/*","!./src/server.ts"],"coverageDirectory":"/home/s1n7ax/Workspace/decorator-issue/coverage","coveragePathIgnorePatterns":["./dist"],"cwd":"/home/s1n7ax/Workspace/decorator-issue","detectLeaks":false,"detectOpenHandles":true,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"enableSymlinks":false,"forceNodeFilesystemAPI":true,"throwOnModuleCollision":false},"id":"0e9a0f71dae6fa2d56bf23e07acbfba6","injectGlobals":true,"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","mjs","cjs","jsx","ts","tsx","json","node"],"moduleNameMapper":[],"modulePathIgnorePatterns":["./dist"],"openHandlesTimeout":1000,"prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/home/s1n7ax/Workspace/decorator-issue","roots":["/home/s1n7ax/Workspace/decorator-issue"],"runner":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-runner/build/index.js","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"slowTestThreshold":5,"snapshotFormat":{"escapeString":false,"printBasicPrototype":false},"snapshotSerializers":[],"testEnvironment":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-environment-node/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["/node_modules/"],"testRegex":[],"testRunner":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-circus/runner.js","transform":[[".*","/home/s1n7ax/Workspace/decorator-issue/node_modules/ts-jest/dist/index.js",{"ignoreCoverageForAllDecorators":true}]],"transformIgnorePatterns":["/node_modules/","\\.pnp\\.[^\\/]+$"],"watchPathIgnorePatterns":[]},"configString":"{\"automock\":false,\"cache\":true,\"cacheDirectory\":\"/tmp/jest_rs\",\"clearMocks\":false,\"collectCoverageFrom\":[\"./src/**/*\",\"!./src/server.ts\"],\"coverageDirectory\":\"/home/s1n7ax/Workspace/decorator-issue/coverage\",\"coveragePathIgnorePatterns\":[\"./dist\"],\"cwd\":\"/home/s1n7ax/Workspace/decorator-issue\",\"detectLeaks\":false,\"detectOpenHandles\":true,\"errorOnDeprecated\":false,\"extensionsToTreatAsEsm\":[],\"fakeTimers\":{\"enableGlobally\":false},\"forceCoverageMatch\":[],\"globals\":{},\"haste\":{\"computeSha1\":false,\"enableSymlinks\":false,\"forceNodeFilesystemAPI\":true,\"throwOnModuleCollision\":false},\"id\":\"0e9a0f71dae6fa2d56bf23e07acbfba6\",\"injectGlobals\":true,\"moduleDirectories\":[\"node_modules\"],\"moduleFileExtensions\":[\"js\",\"mjs\",\"cjs\",\"jsx\",\"ts\",\"tsx\",\"json\",\"node\"],\"moduleNameMapper\":[],\"modulePathIgnorePatterns\":[\"./dist\"],\"openHandlesTimeout\":1000,\"prettierPath\":\"prettier\",\"resetMocks\":false,\"resetModules\":false,\"restoreMocks\":false,\"rootDir\":\"/home/s1n7ax/Workspace/decorator-issue\",\"roots\":[\"/home/s1n7ax/Workspace/decorator-issue\"],\"runner\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-runner/build/index.js\",\"sandboxInjectedGlobals\":[],\"setupFiles\":[],\"setupFilesAfterEnv\":[],\"skipFilter\":false,\"slowTestThreshold\":5,\"snapshotFormat\":{\"escapeString\":false,\"printBasicPrototype\":false},\"snapshotSerializers\":[],\"testEnvironment\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-environment-node/build/index.js\",\"testEnvironmentOptions\":{},\"testLocationInResults\":false,\"testMatch\":[\"**/__tests__/**/*.[jt]s?(x)\",\"**/?(*.)+(spec|test).[tj]s?(x)\"],\"testPathIgnorePatterns\":[\"/node_modules/\"],\"testRegex\":[],\"testRunner\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-circus/runner.js\",\"transform\":[[\".*\",\"/home/s1n7ax/Workspace/decorator-issue/node_modules/ts-jest/dist/index.js\",{\"ignoreCoverageForAllDecorators\":true}]],\"transformIgnorePatterns\":[\"/node_modules/\",\"\\\\.pnp\\\\.[^\\\\/]+$\"],\"watchPathIgnorePatterns\":[]}","coverageProvider":"babel","instrument":false,"isInternalModule":false,"supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"transformerConfig":{"ignoreCoverageForAllDecorators":true}},"version":"29.2.5"},"message":"computing cache key for /home/s1n7ax/Workspace/decorator-issue/__tests__/app.test.ts","sequence":431,"time":"2024-09-04T17:35:55.005Z"}
{"context":{"fileName":"/home/s1n7ax/Workspace/decorator-issue/__tests__/app.test.ts","logLevel":20,"namespace":"ts-jest-transformer","package":"ts-jest","transformOptions":{"cacheFS":{},"collectCoverage":true,"collectCoverageFrom":["./src/**/*","!./src/server.ts"],"config":{"automock":false,"cache":true,"cacheDirectory":"/tmp/jest_rs","clearMocks":false,"collectCoverageFrom":["./src/**/*","!./src/server.ts"],"coverageDirectory":"/home/s1n7ax/Workspace/decorator-issue/coverage","coveragePathIgnorePatterns":["./dist"],"cwd":"/home/s1n7ax/Workspace/decorator-issue","detectLeaks":false,"detectOpenHandles":true,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"enableSymlinks":false,"forceNodeFilesystemAPI":true,"throwOnModuleCollision":false},"id":"0e9a0f71dae6fa2d56bf23e07acbfba6","injectGlobals":true,"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","mjs","cjs","jsx","ts","tsx","json","node"],"moduleNameMapper":[],"modulePathIgnorePatterns":["./dist"],"openHandlesTimeout":1000,"prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/home/s1n7ax/Workspace/decorator-issue","roots":["/home/s1n7ax/Workspace/decorator-issue"],"runner":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-runner/build/index.js","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"slowTestThreshold":5,"snapshotFormat":{"escapeString":false,"printBasicPrototype":false},"snapshotSerializers":[],"testEnvironment":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-environment-node/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["/node_modules/"],"testRegex":[],"testRunner":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-circus/runner.js","transform":[[".*","/home/s1n7ax/Workspace/decorator-issue/node_modules/ts-jest/dist/index.js",{"ignoreCoverageForAllDecorators":true}]],"transformIgnorePatterns":["/node_modules/","\\.pnp\\.[^\\/]+$"],"watchPathIgnorePatterns":[]},"configString":"{\"automock\":false,\"cache\":true,\"cacheDirectory\":\"/tmp/jest_rs\",\"clearMocks\":false,\"collectCoverageFrom\":[\"./src/**/*\",\"!./src/server.ts\"],\"coverageDirectory\":\"/home/s1n7ax/Workspace/decorator-issue/coverage\",\"coveragePathIgnorePatterns\":[\"./dist\"],\"cwd\":\"/home/s1n7ax/Workspace/decorator-issue\",\"detectLeaks\":false,\"detectOpenHandles\":true,\"errorOnDeprecated\":false,\"extensionsToTreatAsEsm\":[],\"fakeTimers\":{\"enableGlobally\":false},\"forceCoverageMatch\":[],\"globals\":{},\"haste\":{\"computeSha1\":false,\"enableSymlinks\":false,\"forceNodeFilesystemAPI\":true,\"throwOnModuleCollision\":false},\"id\":\"0e9a0f71dae6fa2d56bf23e07acbfba6\",\"injectGlobals\":true,\"moduleDirectories\":[\"node_modules\"],\"moduleFileExtensions\":[\"js\",\"mjs\",\"cjs\",\"jsx\",\"ts\",\"tsx\",\"json\",\"node\"],\"moduleNameMapper\":[],\"modulePathIgnorePatterns\":[\"./dist\"],\"openHandlesTimeout\":1000,\"prettierPath\":\"prettier\",\"resetMocks\":false,\"resetModules\":false,\"restoreMocks\":false,\"rootDir\":\"/home/s1n7ax/Workspace/decorator-issue\",\"roots\":[\"/home/s1n7ax/Workspace/decorator-issue\"],\"runner\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-runner/build/index.js\",\"sandboxInjectedGlobals\":[],\"setupFiles\":[],\"setupFilesAfterEnv\":[],\"skipFilter\":false,\"slowTestThreshold\":5,\"snapshotFormat\":{\"escapeString\":false,\"printBasicPrototype\":false},\"snapshotSerializers\":[],\"testEnvironment\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-environment-node/build/index.js\",\"testEnvironmentOptions\":{},\"testLocationInResults\":false,\"testMatch\":[\"**/__tests__/**/*.[jt]s?(x)\",\"**/?(*.)+(spec|test).[tj]s?(x)\"],\"testPathIgnorePatterns\":[\"/node_modules/\"],\"testRegex\":[],\"testRunner\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-circus/runner.js\",\"transform\":[[\".*\",\"/home/s1n7ax/Workspace/decorator-issue/node_modules/ts-jest/dist/index.js\",{\"ignoreCoverageForAllDecorators\":true}]],\"transformIgnorePatterns\":[\"/node_modules/\",\"\\\\.pnp\\\\.[^\\\\/]+$\"],\"watchPathIgnorePatterns\":[]}","coverageProvider":"babel","instrument":false,"isInternalModule":false,"supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"transformerConfig":{"ignoreCoverageForAllDecorators":true}},"version":"29.2.5"},"message":"getting resolved modules from TypeScript API for /home/s1n7ax/Workspace/decorator-issue/__tests__/app.test.ts","sequence":432,"time":"2024-09-04T17:35:55.005Z"}
{"context":{"fileName":"/home/s1n7ax/Workspace/decorator-issue/__tests__/app.test.ts","logLevel":20,"namespace":"ts-compiler","package":"ts-jest","version":"29.2.5"},"message":"getResolvedModules(): resolve direct imported module paths","sequence":433,"time":"2024-09-04T17:35:55.005Z"}
{"context":{"fileName":"/home/s1n7ax/Workspace/decorator-issue/__tests__/app.test.ts","logLevel":20,"namespace":"ts-compiler","package":"ts-jest","version":"29.2.5"},"message":"getResolvedModules(): resolve nested imported module paths from directed imported module paths","sequence":434,"time":"2024-09-04T17:35:55.006Z"}
{"context":{"call":null,"logLevel":10,"namespace":"ts:serviceHost","package":"ts-jest","version":"29.2.5"},"message":"readFile","sequence":435,"time":"2024-09-04T17:35:55.006Z"}
{"context":{"fileName":"/home/s1n7ax/Workspace/decorator-issue/src/app.ts","logLevel":20,"namespace":"ts-jest-transformer","package":"ts-jest","transformOptions":{"cacheFS":{},"collectCoverage":true,"collectCoverageFrom":["./src/**/*","!./src/server.ts"],"config":{"automock":false,"cache":true,"cacheDirectory":"/tmp/jest_rs","clearMocks":false,"collectCoverageFrom":["./src/**/*","!./src/server.ts"],"coverageDirectory":"/home/s1n7ax/Workspace/decorator-issue/coverage","coveragePathIgnorePatterns":["./dist"],"cwd":"/home/s1n7ax/Workspace/decorator-issue","detectLeaks":false,"detectOpenHandles":true,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"enableSymlinks":false,"forceNodeFilesystemAPI":true,"throwOnModuleCollision":false},"id":"0e9a0f71dae6fa2d56bf23e07acbfba6","injectGlobals":true,"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","mjs","cjs","jsx","ts","tsx","json","node"],"moduleNameMapper":[],"modulePathIgnorePatterns":["./dist"],"openHandlesTimeout":1000,"prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/home/s1n7ax/Workspace/decorator-issue","roots":["/home/s1n7ax/Workspace/decorator-issue"],"runner":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-runner/build/index.js","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"slowTestThreshold":5,"snapshotFormat":{"escapeString":false,"printBasicPrototype":false},"snapshotSerializers":[],"testEnvironment":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-environment-node/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["/node_modules/"],"testRegex":[],"testRunner":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-circus/runner.js","transform":[[".*","/home/s1n7ax/Workspace/decorator-issue/node_modules/ts-jest/dist/index.js",{"ignoreCoverageForAllDecorators":true}]],"transformIgnorePatterns":["/node_modules/","\\.pnp\\.[^\\/]+$"],"watchPathIgnorePatterns":[]},"configString":"{\"automock\":false,\"cache\":true,\"cacheDirectory\":\"/tmp/jest_rs\",\"clearMocks\":false,\"collectCoverageFrom\":[\"./src/**/*\",\"!./src/server.ts\"],\"coverageDirectory\":\"/home/s1n7ax/Workspace/decorator-issue/coverage\",\"coveragePathIgnorePatterns\":[\"./dist\"],\"cwd\":\"/home/s1n7ax/Workspace/decorator-issue\",\"detectLeaks\":false,\"detectOpenHandles\":true,\"errorOnDeprecated\":false,\"extensionsToTreatAsEsm\":[],\"fakeTimers\":{\"enableGlobally\":false},\"forceCoverageMatch\":[],\"globals\":{},\"haste\":{\"computeSha1\":false,\"enableSymlinks\":false,\"forceNodeFilesystemAPI\":true,\"throwOnModuleCollision\":false},\"id\":\"0e9a0f71dae6fa2d56bf23e07acbfba6\",\"injectGlobals\":true,\"moduleDirectories\":[\"node_modules\"],\"moduleFileExtensions\":[\"js\",\"mjs\",\"cjs\",\"jsx\",\"ts\",\"tsx\",\"json\",\"node\"],\"moduleNameMapper\":[],\"modulePathIgnorePatterns\":[\"./dist\"],\"openHandlesTimeout\":1000,\"prettierPath\":\"prettier\",\"resetMocks\":false,\"resetModules\":false,\"restoreMocks\":false,\"rootDir\":\"/home/s1n7ax/Workspace/decorator-issue\",\"roots\":[\"/home/s1n7ax/Workspace/decorator-issue\"],\"runner\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-runner/build/index.js\",\"sandboxInjectedGlobals\":[],\"setupFiles\":[],\"setupFilesAfterEnv\":[],\"skipFilter\":false,\"slowTestThreshold\":5,\"snapshotFormat\":{\"escapeString\":false,\"printBasicPrototype\":false},\"snapshotSerializers\":[],\"testEnvironment\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-environment-node/build/index.js\",\"testEnvironmentOptions\":{},\"testLocationInResults\":false,\"testMatch\":[\"**/__tests__/**/*.[jt]s?(x)\",\"**/?(*.)+(spec|test).[tj]s?(x)\"],\"testPathIgnorePatterns\":[\"/node_modules/\"],\"testRegex\":[],\"testRunner\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-circus/runner.js\",\"transform\":[[\".*\",\"/home/s1n7ax/Workspace/decorator-issue/node_modules/ts-jest/dist/index.js\",{\"ignoreCoverageForAllDecorators\":true}]],\"transformIgnorePatterns\":[\"/node_modules/\",\"\\\\.pnp\\\\.[^\\\\/]+$\"],\"watchPathIgnorePatterns\":[]}","coverageProvider":"babel","instrument":true,"isInternalModule":false,"supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"transformerConfig":{"ignoreCoverageForAllDecorators":true}},"version":"29.2.5"},"message":"computing cache key for /home/s1n7ax/Workspace/decorator-issue/src/app.ts","sequence":436,"time":"2024-09-04T17:35:55.007Z"}
{"context":{"fileName":"/home/s1n7ax/Workspace/decorator-issue/src/app.ts","logLevel":20,"namespace":"ts-jest-transformer","package":"ts-jest","transformOptions":{"cacheFS":{},"collectCoverage":true,"collectCoverageFrom":["./src/**/*","!./src/server.ts"],"config":{"automock":false,"cache":true,"cacheDirectory":"/tmp/jest_rs","clearMocks":false,"collectCoverageFrom":["./src/**/*","!./src/server.ts"],"coverageDirectory":"/home/s1n7ax/Workspace/decorator-issue/coverage","coveragePathIgnorePatterns":["./dist"],"cwd":"/home/s1n7ax/Workspace/decorator-issue","detectLeaks":false,"detectOpenHandles":true,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"enableSymlinks":false,"forceNodeFilesystemAPI":true,"throwOnModuleCollision":false},"id":"0e9a0f71dae6fa2d56bf23e07acbfba6","injectGlobals":true,"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","mjs","cjs","jsx","ts","tsx","json","node"],"moduleNameMapper":[],"modulePathIgnorePatterns":["./dist"],"openHandlesTimeout":1000,"prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/home/s1n7ax/Workspace/decorator-issue","roots":["/home/s1n7ax/Workspace/decorator-issue"],"runner":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-runner/build/index.js","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"slowTestThreshold":5,"snapshotFormat":{"escapeString":false,"printBasicPrototype":false},"snapshotSerializers":[],"testEnvironment":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-environment-node/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["/node_modules/"],"testRegex":[],"testRunner":"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-circus/runner.js","transform":[[".*","/home/s1n7ax/Workspace/decorator-issue/node_modules/ts-jest/dist/index.js",{"ignoreCoverageForAllDecorators":true}]],"transformIgnorePatterns":["/node_modules/","\\.pnp\\.[^\\/]+$"],"watchPathIgnorePatterns":[]},"configString":"{\"automock\":false,\"cache\":true,\"cacheDirectory\":\"/tmp/jest_rs\",\"clearMocks\":false,\"collectCoverageFrom\":[\"./src/**/*\",\"!./src/server.ts\"],\"coverageDirectory\":\"/home/s1n7ax/Workspace/decorator-issue/coverage\",\"coveragePathIgnorePatterns\":[\"./dist\"],\"cwd\":\"/home/s1n7ax/Workspace/decorator-issue\",\"detectLeaks\":false,\"detectOpenHandles\":true,\"errorOnDeprecated\":false,\"extensionsToTreatAsEsm\":[],\"fakeTimers\":{\"enableGlobally\":false},\"forceCoverageMatch\":[],\"globals\":{},\"haste\":{\"computeSha1\":false,\"enableSymlinks\":false,\"forceNodeFilesystemAPI\":true,\"throwOnModuleCollision\":false},\"id\":\"0e9a0f71dae6fa2d56bf23e07acbfba6\",\"injectGlobals\":true,\"moduleDirectories\":[\"node_modules\"],\"moduleFileExtensions\":[\"js\",\"mjs\",\"cjs\",\"jsx\",\"ts\",\"tsx\",\"json\",\"node\"],\"moduleNameMapper\":[],\"modulePathIgnorePatterns\":[\"./dist\"],\"openHandlesTimeout\":1000,\"prettierPath\":\"prettier\",\"resetMocks\":false,\"resetModules\":false,\"restoreMocks\":false,\"rootDir\":\"/home/s1n7ax/Workspace/decorator-issue\",\"roots\":[\"/home/s1n7ax/Workspace/decorator-issue\"],\"runner\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-runner/build/index.js\",\"sandboxInjectedGlobals\":[],\"setupFiles\":[],\"setupFilesAfterEnv\":[],\"skipFilter\":false,\"slowTestThreshold\":5,\"snapshotFormat\":{\"escapeString\":false,\"printBasicPrototype\":false},\"snapshotSerializers\":[],\"testEnvironment\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-environment-node/build/index.js\",\"testEnvironmentOptions\":{},\"testLocationInResults\":false,\"testMatch\":[\"**/__tests__/**/*.[jt]s?(x)\",\"**/?(*.)+(spec|test).[tj]s?(x)\"],\"testPathIgnorePatterns\":[\"/node_modules/\"],\"testRegex\":[],\"testRunner\":\"/home/s1n7ax/Workspace/decorator-issue/node_modules/jest-circus/runner.js\",\"transform\":[[\".*\",\"/home/s1n7ax/Workspace/decorator-issue/node_modules/ts-jest/dist/index.js\",{\"ignoreCoverageForAllDecorators\":true}]],\"transformIgnorePatterns\":[\"/node_modules/\",\"\\\\.pnp\\\\.[^\\\\/]+$\"],\"watchPathIgnorePatterns\":[]}","coverageProvider":"babel","instrument":true,"isInternalModule":false,"supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"transformerConfig":{"ignoreCoverageForAllDecorators":true}},"version":"29.2.5"},"message":"getting resolved modules from TypeScript API for /home/s1n7ax/Workspace/decorator-issue/src/app.ts","sequence":437,"time":"2024-09-04T17:35:55.008Z"}
{"context":{"fileName":"/home/s1n7ax/Workspace/decorator-issue/src/app.ts","logLevel":20,"namespace":"ts-compiler","package":"ts-jest","version":"29.2.5"},"message":"getResolvedModules(): resolve direct imported module paths","sequence":438,"time":"2024-09-04T17:35:55.008Z"}
{"context":{"fileName":"/home/s1n7ax/Workspace/decorator-issue/src/app.ts","logLevel":20,"namespace":"ts-compiler","package":"ts-jest","version":"29.2.5"},"message":"getResolvedModules(): resolve nested imported module paths from directed imported module paths","sequence":439,"time":"2024-09-04T17:35:55.008Z"}
{"context":{"logLevel":20,"namespace":"ts-jest-transformer","package":"ts-jest","version":"29.2.5"},"message":"created new transformer","sequence":440,"time":"2024-09-04T17:35:55.028Z"}

Additional context

Repo where you can recreate this issue:
https://github.com/srinesha/decorator-coverage-issue

image
image

Environment

System:
    OS: Linux 6.6 NixOS 24.05 (Uakari) 24.05 (Uakari)
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U
  Binaries:
    Node: 22.4.1 - /etc/profiles/per-user/s1n7ax/bin/node
    Yarn: 1.22.22 - /etc/profiles/per-user/s1n7ax/bin/yarn
    npm: 10.8.1 - /etc/profiles/per-user/s1n7ax/bin/npm
    pnpm: 8.15.5 - /etc/profiles/per-user/s1n7ax/bin/pnpm
@ahnpnl
Copy link
Collaborator

ahnpnl commented Sep 4, 2024

Hi, ts-jest isn't responsible for generating coverage report. Coverage report is handled by Jest itself.

@srinesha
Copy link
Author

srinesha commented Sep 5, 2024

Created this in jest
jestjs/jest#15293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants