🐛 Bug: --fail-zero always fails the test run when --delay is also used #4950
Labels
status: accepting prs
Mocha can use your help with this one!
type: bug
a defect, confirmed by a maintainer
Prerequisites
faq
labelnode_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.Description
Running mocha with --fail-zero and --delay options, and calling run(). The exit code is always 1, even when some tests did run.
Steps to Reproduce
I created a gist with the files used in the examples below: https://gist.github.com/tonimellodic/525d29054744ca6d602145b81eb57e80
Expected behavior: Running with
--fail-zero
and--delay
producesexit 0
when at least one test run.Actual behavior: Running with
--fail-zero
and--delay
always producesexit 1
.Running with
--fail-zero
only:Running with
--fail-zero
and--delay
:Reproduces how often: Always
Versions
mocha 10.1.0
node 16.13.1
MacOS 12.6.1
zsh shell
The text was updated successfully, but these errors were encountered: