What is the benefit to use jest-runner-tsc?
VusalIs opened this issue · 1 comments
VusalIs commented
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 commented
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