-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
v8 coverage crashes with type-only files #10812
Comments
From what I've seen debugging this a little bit, it seems like the type-only module is empty, so the sourcemap is empty/missing, and that empty/missing sourcemap is sent to |
This is what we pass {
originalSource: 'export interface obj {}\n\n',
source: '"use strict";\n' +
'//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbXX0=',
sourceMap: {
sourcemap: {
version: 3,
sources: [],
names: [],
mappings: '',
sourcesContent: []
}
}
} Seems like a bug in |
@SimenB Thanks! |
Not sure what ti should do though - probably fallback to |
I see this issue again with latest versions, see istanbuljs/v8-to-istanbul#134 |
Using |
No, we are using 26.6.3. It's only fixed in |
#10819 is only available in Good to fix in istanbul of course, then you'd be able to use 26 👍 |
Yeah, using Any timeframe for next jest version? |
Hoping this month, but I've not had much time for OSS these last few months |
Just merged @viceice's patch 👌 sorry for the nuisance. |
Thanks @bcoe! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
With
coverageProvider: 'v8'
and coverage enabled, Jest crashes with imported but non-elided type-only modules.To Reproduce
Steps to reproduce the behavior:
jest.config.mjs
:babel.config.json
src/types.ts
:src/mytest.test.ts
:npx jest
Expected behavior
Jest doesn't crash, and coverage works.
Link to repl or repo (highly encouraged)
envinfo
The text was updated successfully, but these errors were encountered: