You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the ts-jest preset with a Jest configuration containing multiple projects, it doesn't behave quite as expected during coverage collection of untested files.
Tests should run, and coverage should be generated.
Actual behavior
Files that are not tested instead run into syntax errors on TypeScript constructs (presumably because babel is processing them rather than ts-jest), and coverage fails to be collected.
This is an issue for Jest. When you specify projects, Jest will overwrite the other config options and only a few options are not overwritten (I don't remember which one).
This is not something ts-jest can do. You need to ask Jest to support it.
Version
28.0.6
Steps to reproduce
When using the
ts-jest
preset with a Jest configuration containing multiple projects, it doesn't behave quite as expected during coverage collection of untested files.Expected behavior
Tests should run, and coverage should be generated.
Actual behavior
Files that are not tested instead run into syntax errors on TypeScript constructs (presumably because babel is processing them rather than ts-jest), and coverage fails to be collected.
Debug log
Additional context
Note that I can work around this by explicitly including the ts-jest transform within each project:
Environment
The text was updated successfully, but these errors were encountered: