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

What is the benefit to use jest-runner-tsc? #23

Open
VusalIs opened this issue Mar 31, 2021 · 1 comment
Open

What is the benefit to use jest-runner-tsc? #23

VusalIs opened this issue Mar 31, 2021 · 1 comment

Comments

@VusalIs
Copy link

VusalIs commented Mar 31, 2021

I convert test files from flow javascript to typescript. I saw that in the application, I use jest-runner, but in the documentation of jest, there is also jest-runner-tsc. I try to understand the difference between them and what kind of benefit I will get if I use jest-runner-tsc? Additionally, I converted some test files to typescript and it works fine with jest-runner.

@stixx200
Copy link

jest-runner-tsc doesn't run tests. It runs the tsc (typescript compiler) on the typescript files.
Doin so, you can check / build your application with the tsc.

If you also want to run tests on your code base, you have to create two entry points for jest:

  • jest.config.js // runs your tests with jest
  • jest.tsc.config.js // runs tsc on your ts files -> call it with jest -c ./jest.tsc.config.js

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