Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As part of looking into #887 I ran into a ton of difficulty getting `ts-jest` to work with ESM, with one of the main issues being related to importing `./utils.js` style files. This seems to be an issue with the combination of TypeScript + Jest when using ESM, and the `ts-jest` preset hasn't "fixed" this yet (by doing something like the `moduleNameMapper` approach mentioned in [comments like this](kulshekhar/ts-jest#1057 (comment)). Has there not been any PR from someone? In any case, it's a bit frustrating that there wasn't a mention of this in the troubleshooting docs as the issue above was pretty well trafficked and commented on, and while there was a PR, it was closed and there was no follow up. What's worse is that this issue has been known for at least 4 years. There really should have been a troubleshooting section added here even without a community contributed PR, and so I don't have faith that either an additon to the preset or a mention in the troubleshooting docs will happen anytime soon, at least before I want to get Stylelint 16 in main. While checking types in the test code is useful, it's not that important since the actual code is type checked separately (both with the linter and the compilation steps), and since `@swc/jest` is simpler and hopefully doesn't have the above frustration factor, I've decided to migrate from `ts-jest` to `@swc/jest`. If at some point type checking the tests becomes important the lint:types task can be updated to check test code too.
- Loading branch information