Closed ljobse closed 3 years ago
In version 2.13.0 you can configure a watcher for triggering reloads with the mochaExplorer.watch
config option. I have added some documentation to the section on using transpilers.
This is still experimental, so please tell me if it works for you.
Perfect. Works like a charm and the docs are clear 👌
Scenario
Typescript project where the tests are loaded from the build folder. Compilation happens automatically with a tsc watch task running.
The problem
Change detection will only work on source files as vscode does not trigger an event for the actual build files. That means test explorer can't detect any new/changed tests when creating them.
Possible solution
This way we will be able to listen for changes in the source files and after 100ms the build will be ready so the tests can be reloaded.
@hbenl I've been searching in the code on how to accomplish this but couldn't get far but it shouldn't be to difficult I guess. If you push me into the right direction I'll give it a try and create a PR.