azz / jest-runner-tsc

🃏A Jest runner for the TypeScript compiler
MIT License
178 stars 12 forks source link

What's the point? #15

Open anilanar opened 5 years ago

anilanar commented 5 years ago

This runner uses transpileModule function from Typescript compiler API which does not type check. If so, what's the point of jest-runner-tsc?

christopherscott commented 5 years ago

I agree w/ @anilanar; our team will probably move to simply using tsc --noEmit directly for type-checking test.

See https://github.com/Microsoft/TypeScript/issues/4864 for TypeScript team's rationale on why transpileModule doesn't report semantic errors.

Probably overkill, but I made a simple TS to repro this and collect links to some issues: https://github.com/christopherscott/jest-runner-tsc-transpile-module

azz commented 5 years ago

It's a bug, this was a regression because of https://github.com/azz/jest-runner-tsc/pull/14. We're still looking for a solution.

azz commented 5 years ago

Going to revert that for now.

anilanar commented 5 years ago

I guess jest runner is not a good solution for project-wide lints/compiles/analysis. We should create an alternative runner that can also run jest, that supports watch mode and prints in a nice visual way with parallelism.