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.
Description
Mocha 8.2 introduces unexpected behaviour when using sinon.fakeTimers()
Steps to Reproduce
Tests which don't call done() are failing with a message saying that done() has been called multiple times. Other tests which are supposed to call done are ending before done() is called.
Expected behavior: [What you expect to happen]
The test should pass. for 8.1.3 and below it works, 8.2.0 it breaks.
Actual behavior: [What actually happens]
The test fails with this message
Error: done() called multiple times in test <timeout-test using async-lock says done is called multiple times> of file ....\donetest.js
at tryCatcher (server\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (server\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (server\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (server\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (server\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (server\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (server\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (server\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (server\node_modules\bluebird\js\release\async.js:15:14)
Error: 999
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
8.2.0
The output of mocha --version and node node_modules/.bin/mocha --version:
'mocha' is not recognized as an internal or external command, operable program or batch file.
8.2.0
The output of node --version:
v10.22.0
Your operating system
name and version: Windows 10
architecture (32 or 64-bit): 64 bit
Your shell (e.g., bash, zsh, PowerShell, cmd): cmd
Your browser and version (if running browser tests): N/A
I can confirm test passes with v8.2.1, so closing this issue, thanks.
I actually did like the uncaught error reports in v8.2.0, it forced us to check our code and tests very carefully for unhandled promise rejections and in a couple of cases did identify actual errors in our code.
Prerequisites
faq
labelnode node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.Description
Mocha 8.2 introduces unexpected behaviour when using sinon.fakeTimers()
Steps to Reproduce
Tests which don't call done() are failing with a message saying that done() has been called multiple times. Other tests which are supposed to call done are ending before done() is called.
Here's an example:
Expected behavior: [What you expect to happen]
The test should pass. for 8.1.3 and below it works, 8.2.0 it breaks.
Actual behavior: [What actually happens]
The test fails with this message
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
8.2.0
mocha --version
andnode node_modules/.bin/mocha --version
:'mocha' is not recognized as an internal or external command, operable program or batch file.
8.2.0
node --version
:v10.22.0
"async-lock": "^1.2.0",
"bluebird": "^3.4.0",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"mocha": "^8.0.1",
"sinon": "^9.0.0",
"sinon-chai": "^3.2.0",
Additional Information
The text was updated successfully, but these errors were encountered: