-
-
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
[Feature]: Allow usage of tsm instead of ts-node? #11989
Comments
PR very much welcome! |
The disadvantage to using What I propose instead:
I chose @SimenB would you accept a PR implementing this approach? |
would that work if said file imported another ts file? or will swc bundle? |
If said file imported another TS file, it wouldn't work. I know |
(I don't care if |
Ah, okay. I'll look into it. Just to confirm, you are open to a PR removing |
I don't think we should remove |
What would be breaking about removing |
For people currently using |
Ah okay. I will implement |
What about a fallback mechanism where Jest will try to parse the config file with esbuild if |
If config loading happens within a CJS context, something like this would work just fine: https://boostlib.dev/docs/module#commonjs-requires |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
Not stale? There is also now another alternative called |
Current thinking: #13143 (comment) I.e. allowing a user to specify which loader to use. |
Both |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
Not stale |
🚀 Feature Proposal
Jest allows for configuration in TypeScript via
ts-node
:https://github.com/facebook/jest/blob/7f39f0a589703191a0cd3c6db558920281f7195f/docs/Configuration.md?plain=1#L37
It would be great to also enable support for
tsm
Motivation
tsm
is lighter weight and faster thants-node
tsm
for other tasks, it would be nice to not have to also installts-node
only for JestExample
No response
Pitch
Not entirely sure I understand this field, but maybe:
It fits Jest's ideology of being fast and enabling modern techniques
The text was updated successfully, but these errors were encountered: