Latest version (19.0.2) does not generate coverage for me (errors)
See original GitHub issueI’ve updated to latest version due to #132 which supposedly fixes issues with my project like #104), but now I can’t even generate any coverage. The process fails with errors.
Under my app source code folder I have a typings
folder where I place custom *.d.ts
files so that TypeScript finds all the types for my code. I currently have 3 of these *.d.ts
files and generating coverage with ts-jest
is giving me 3 errors on these 3 files, something like this:
Failed to collect coverage from C:\MyProject\app\typings\files.d.ts
ERROR: Error: Debug Failure. False expression: Output generation failed
STACK: Error: Debug Failure. False expression: Output generation failed
at Object.assert (C:\MyProject\node_modules\typescript\lib\typescript.js:3259:23)
at Object.transpileModule (C:\MyProject\node_modules\typescript\lib\typescript.js:76181:18)
at Object.process (C:\MyProject\node_modules\ts-jest\dist\preprocessor.js:16:30)
at Function.transformSource (C:\MyProject\node_modules\jest-runtime\build\transform.js:282:24)
at transformSource (C:\MyProject\node_modules\jest-runtime\build\index.js:159:22)
at module.exports (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\generateEmptyCoverage.js:23:14)
at files.forEach.e (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:102:30)
at Set.forEach (native)
at CoverageReporter._addUntestedFiles (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:98:13)
at CoverageReporter.onRunComplete (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:56:10)
Failed to collect coverage from C:\MyProject\app\typings\twilio.d.ts
ERROR: Error: Debug Failure. False expression: Output generation failed
STACK: Error: Debug Failure. False expression: Output generation failed
at Object.assert (C:\MyProject\node_modules\typescript\lib\typescript.js:3259:23)
at Object.transpileModule (C:\MyProject\node_modules\typescript\lib\typescript.js:76181:18)
at Object.process (C:\MyProject\node_modules\ts-jest\dist\preprocessor.js:16:30)
at Function.transformSource (C:\MyProject\node_modules\jest-runtime\build\transform.js:282:24)
at transformSource (C:\MyProject\node_modules\jest-runtime\build\index.js:159:22)
at module.exports (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\generateEmptyCoverage.js:23:14)
at files.forEach.e (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:102:30)
at Set.forEach (native)
at CoverageReporter._addUntestedFiles (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:98:13)
at CoverageReporter.onRunComplete (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:56:10)
Failed to collect coverage from C:\MyProject\app\typings\globals.d.ts
ERROR: Error: Debug Failure. False expression: Output generation failed
STACK: Error: Debug Failure. False expression: Output generation failed
at Object.assert (C:\MyProject\node_modules\typescript\lib\typescript.js:3259:23)
at Object.transpileModule (C:\MyProject\node_modules\typescript\lib\typescript.js:76181:18)
at Object.process (C:\MyProject\node_modules\ts-jest\dist\preprocessor.js:16:30)
at Function.transformSource (C:\MyProject\node_modules\jest-runtime\build\transform.js:282:24)
at transformSource (C:\MyProject\node_modules\jest-runtime\build\index.js:159:22)
at module.exports (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\generateEmptyCoverage.js:23:14)
at files.forEach.e (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:102:30)
at Set.forEach (native)
at CoverageReporter._addUntestedFiles (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:98:13)
at CoverageReporter.onRunComplete (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\reporters\CoverageReporter.js:56:10)
In the end I get this:
Ran all test suites.
Error: ENOENT: no such file or directory, scandir 'C:\Users\Amaral\AppData\Local\Temp\jest\ts-jest'
at Error (native)
at Object.fs.readdirSync (fs.js:951:18)
at processResult (C:\MyProject\node_modules\ts-jest\dist\coverageprocessor.js:20:26)
at source.getTestPaths.then.then.then.runResults (C:\MyProject\node_modules\jest\node_modules\jest-cli\build\runJest.js:110:58)
at process._tickCallback (internal/process/next_tick.js:103:7)
npm ERR! Test failed. See above for more details.
I don’t have a minimal repo working not even a public one, sorry. But I can provide access to the private project where I’m having this issue if needed.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Code coverage generation fails on … | Apple Developer Forums
I created a package completely from scratch using default options with no dependencies and it still has the error. The most obvious explanation...
Read more >Troubleshooting Code Coverage - Visual Studio (Windows)
In this article. What you should see; Possible reasons for seeing no results or old results; Some code is always shown as not...
Read more >Code coverage not generating results with ...
No errors are generated during the test run (all tests are running), but the resulting .coverage file is empty. If we run the...
Read more >How to File the FBAR Electronically - BSA E-Filing System
Select Tools → Manage Add-Ons: Page 4. 4. Click the Currently Loaded Add-Ons under the Show label and then select All-Add-Ons: Locate the...
Read more >What Are the Code Coverage Metrics for Ruby on Rails?
I couldn't find any information about this online, so I decided to generate a few reports for each component. This is an article...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue for me for any type declaration (d.ts) I need to add
"coveragePathIgnorePatterns": [".*\\.d\\.ts", "<rootDir>/node_modules/"]
Yep, that was it. Thanks very much for your help 😃