kulshekhar / ts-jest

A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript.
https://kulshekhar.github.io/ts-jest
MIT License
6.94k stars 452 forks source link

doc: add troubleshooting section about extremely long load times #4567

Open LoganTann opened 1 day ago

LoganTann commented 1 day ago

Summary

closes #4294

Allowing ts-jest to process JavaScript files is not typically beneficial, as ts-jest is a tool specifically designed to transform TypeScript files so that Jest can understand and test them.

Developers who are uninformed about this might mistakenly include JavaScript files in their transform regex, which could result in ts-jest passing all imported modules, including already-transpilled dependencies, to the TypeScript compiler.

This can lead to significant delays when importing modules, particularly during the initial run (without any cache).

This PR aims to add a new entry in the troubleshoot guide, in the hope that people having this issue mind find it from a google search result.

Test plan

No tests, as it is documentation.

Does this PR introduce a breaking change?

Other information

N/A

coveralls commented 1 day ago

Pull Request Test Coverage Report for Build 11177180749

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 11092387309: 0.0%
Covered Lines: 4759
Relevant Lines: 4937

💛 - Coveralls
ahnpnl commented 1 day ago

Would you pls also update TROUBLESHOOTING.md in https://github.com/kulshekhar/ts-jest/tree/main/website/versioned_docs and run npm run lint-prettier to format files?