You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Not refreshing code with mocha --watch when Unable to compile Typescript #113
I've been using ts-node with mocha for running test. It works fine in watch mode. I can change from failing test to success smoothly. But when code error it shown TSError: ⨯ Unable to compile TypeScript by removing imported dependency. and then I put that dependency back. It's not work as expect.
Can confirm this is happening on my setup as well. But when say, I purposely break a test (by making it fail), and then fix it, it does re-run tests. So only on compilation errors.
@EddyLane
I think you only need TS_NODE_IGNORE_WARNINGS=TRUE.
It makes it recompile on change even after compilation error and you still get errors when it fails to compile.
Activity
silviogutierrez commentedon May 30, 2016
Can confirm this is happening on my setup as well. But when say, I purposely break a test (by making it fail), and then fix it, it does re-run tests. So only on compilation errors.
EddyLane commentedon Jun 10, 2016
This is also happening in my set up. If you set the flags:
TS_NODE_IGNORE_WARNINGS=TRUE TS_NODE_DISABLE_WARNINGS=TRUE
then this doesn't happen, but it silently fails to compile so you don't get compilation errors.
arusakov commentedon Oct 7, 2016
mocha -wandts-nodedon't work together in my project tooEoksni commentedon Apr 24, 2017
@EddyLane
I think you only need TS_NODE_IGNORE_WARNINGS=TRUE.
It makes it recompile on change even after compilation error and you still get errors when it fails to compile.
agborkowski commentedon Jan 29, 2018
same here.. TS_NODE_IGNORE_WARNINGS just silent down errors... needs cmd+c and run again
fixed by #266
cspotcode commentedon Aug 26, 2020
Closing because the original issue does not happen on the latest ts-node and mocha.
https://github.com/TypeStrong/ts-node-repros/tree/issue-113
https://github.com/TypeStrong/ts-node-repros/runs/1029421954