Closed
Description
Prerequisites
- Checked that your issue hasn't already been filed by cross-referencing issues with the
faq
labelChecked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itselfEnsured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with:node node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.
Description
Mocha 8.0.0 does not seems to breaks when using --watch
with message Mocha instance is already disposed
Steps to Reproduce
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.
....
Versions
- mac os latest catalina, zsh, TypeScript 39.5
Addtional information
.mocharc.yaml
require: ts-node/register
Metadata
Metadata
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
boneskull commentedon Jun 10, 2020
I'll look at this
boneskull commentedon Jun 10, 2020
I have a fix and will release soon
fix --parallel --watch; closes #4327
fix --parallel --watch; closes #4327
boneskull commentedon Jun 10, 2020
Ref: #4328
boneskull commentedon Jun 10, 2020
Fixed in v8.0.1
jeremychone commentedon Jun 10, 2020
That was fast. Confirmed, fixed. Thanks.
fix --parallel --watch; closes #4327