Skip to content
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

Unclear how to integrate in typescript projects #53

Open
ArsLucidum opened this issue Aug 4, 2022 · 1 comment
Open

Unclear how to integrate in typescript projects #53

ArsLucidum opened this issue Aug 4, 2022 · 1 comment

Comments

@ArsLucidum
Copy link

I'm trying to use jest-light-runner on a testing project, and can't really understand the process I'm supposed to be following, if there is support for such a setup.

What I'm currently doing is adding the runner: "jest-light-runner" option to my jest config (which by itself will output errors for Unknown file extension ".ts").

I understand this is due to on-the-fly compilation not being supported, as mentioned by the docs. It is mentioned that I should use something like ts-node/esm, which I set up with the flag --loader ts-node/esm as part of NODE_OPTIONS.

Doing so is getting me random errors (from pino, our logger, not sure why). Is there anything else I should do? Does typescript support actually rely on this experimental node option, or is there anything else I'm missing?

@ticup
Copy link

ticup commented Nov 23, 2022

@kace91 You can just compile your typescript files with tsc and then instruct jest to run the compiled javascript files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants