Closed aimichal closed 2 years ago
Right now it's locked in transpile only mode so no type checking when running tests because it's much faster to execute. But It's possible to extend the ts-mocha configuration to add type-checking mode. PR's welcome.
Hi @piotrwitek, first off thanks for creating ts-mocha
! We plan on using this for several projects in our codebase. Due to this issue, we currently have a separate compilation step to check the test code for compile errors, which makes our setup more complex and less performant. Therefore I created a pull request that addresses this issue. Please let me know if there's anything I can do to help get this merged. Thanks!
I have a test file which has a typo in the
import
statement, but the test still passes. Is there a way to make the test fail due to compilation errors?Example:
That
import {Blah, Blah, Blah} from '../something';
is an error.tsc test.ts
correctly reports errors liketest.ts:2:32 - error TS2307: Cannot find module '../something'.
.