faq labelnode node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend that you _not_ install Mocha globally.Mocha 8.0.0 does not seems to breaks when using --watch with message Mocha instance is already disposed
With Mocha 0.7.2 running the command below run the tests once and then on code change, execute again (as epected)
./node_modules/.bin/mocha -p ./test/tsconfig.json ./test/spec/*.spec.ts --watch --watch-files './test/**/*.ts','./src/**/*.ts'
With Mocha 8.0.0, run exact same command, on exact same code, will run the tests once correctly, but doing a code change will throw the following error in the terminal.
(node:8867) UnhandledPromiseRejectionWarning: Error: Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.
....
.mocharc.yaml
require: ts-node/register
I'll look at this
I have a fix and will release soon
Ref: #4328
Fixed in v8.0.1
That was fast. Confirmed, fixed. Thanks.