-
Notifications
You must be signed in to change notification settings - Fork 451
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]: Huge performance drop when "allowJs": true is enabled in tsconfig #4294
Labels
Comments
Related: #1115 |
Found a workaround, suggested by the warning message when you disable "allowJs" :
'transform': {
'^.+\\.ts$': 'ts-jest', // << selects only ts. It was previously '^.+\\.(j|t)s$'
}, This is still an issue. This needs to be documented, as I had this issue since at least january and I had to investigate since I cleared my jest cache. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
at least since 0.3.3, tried in 0.5.3 and looks even worse (no proofs though)
Steps to reproduce
Minimal reproduction repository : https://github.com/LoganTann/tsjest-performance-issue-reproduction
npm i
npm run test
Expected behavior
Actual behavior
Simple test is taking an extremely long time (> 10min) to load the dependency
Disabling the {allowJs} property in the tsconfig file will make the test run under 8 seconds. However, jest will print over 1400 warnings (executed
grep " file to compile while" output_nojs.log | wc -l
).After a successful run, later tests are expected to be much faster thanks to the caching.
Debug log
Interrupted execution, took too much time.
Additional context
Performance measures I did five months ago (under 0.3.3)
Environment
The text was updated successfully, but these errors were encountered: