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
Checked 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 itself
Ensured 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) and mocha --version(Global). We recommend that you not install Mocha globally.
Since mocha@8 the watcher crashes when reloading tests and a require fails, for example when causing a syntax error. Errors that happen during test execution are handled correctly by the watcher. Experimenting with different mocha versions, it turns out it is a regression from v7 to v8.
The watcher does not crash when reloading test code. Behavior for the initial test run when starting the watcher is debatable but would be best if it handled both cases well.
Actual behavior:
The watcher crashes when reloading test code that causes an error.
Reproduces how often:
100%
Versions
The output of mocha --version and node node_modules/.bin/mocha --version: 8.30 (but also tried @8.0, and @7)
The output of node --version: v15.6.0
Your operating system
name and version: macOS 11.1
architecture (32 or 64-bit): 64
Your shell (e.g., bash, zsh, PowerShell, cmd): zsh
Your browser and version (if running browser tests):
Any third-party Mocha-related modules (and their versions):
Prerequisites
faq
labelnode node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.Description
MCVE: please see https://github.com/marcelbeumer/mocha-8-watcher-issue for a minimal test case with STR.
Since mocha@8 the watcher crashes when reloading tests and a require fails, for example when causing a syntax error. Errors that happen during test execution are handled correctly by the watcher. Experimenting with different mocha versions, it turns out it is a regression from v7 to v8.
Steps to Reproduce
See MCVE: https://github.com/marcelbeumer/mocha-8-watcher-issue. It seems that when the watcher is reloading code that will throw when requiring, the watcher crashes.
Expected behavior:
The watcher does not crash when reloading test code. Behavior for the initial test run when starting the watcher is debatable but would be best if it handled both cases well.
Actual behavior:
The watcher crashes when reloading test code that causes an error.
Reproduces how often:
100%
Versions
mocha --version
andnode node_modules/.bin/mocha --version
: 8.30 (but also tried @8.0, and @7)node --version
: v15.6.0Additional Information
The text was updated successfully, but these errors were encountered: