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_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend that you not install Mocha globally.
Description
Using the --dry-run flag with many suites causes an execution error.
Dry-run the tests with ./node_modules/mocha/bin/mocha --dry-run
Expected behavior: The test output lists the suits and tests correctly.
Actual behavior:
At some point, the test execution stops with an error, no summary is logged:
Running with DEBUG=mocha:*, logs mocha:runner uncaught(): got truthy exception RangeError: Maximum call stack size exceeded
Reproduces how often: 100%
Versions
The output of mocha --version and node_modules/.bin/mocha --version: No global install, node_modules/.bin/mocha --version is 9.2.1
The output of node --version: v16.13.2
Your operating system
name and version: Ubuntu 20.04.4 LTS
architecture (32 or 64-bit): 64-bit
Your shell (e.g., bash, zsh, PowerShell, cmd): zsh v5.8
Your browser and version (if running browser tests): n/a
Any third-party Mocha-related modules (and their versions): n/a
Any code transpiler (e.g., TypeScript, CoffeeScript, Babel) being used (and its version): n/a
Additional Information
The test run finished as expected when running ./node_modules/mocha/bin/mocha without the --dry-run flag.
Running many tests in one suite instead of many suites with one test each works as expected with the --dry-run flag, e.g. this slightly modified test.js runs fine:
Prerequisites
faq
labelnode_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.Description
Using the
--dry-run
flag with many suites causes an execution error.Steps to Reproduce
Basically following the getting started steps:
test.js
:./node_modules/mocha/bin/mocha --dry-run
Expected behavior: The test output lists the suits and tests correctly.
Actual behavior:
DEBUG=mocha:*
, logsmocha:runner uncaught(): got truthy exception RangeError: Maximum call stack size exceeded
Reproduces how often: 100%
Versions
mocha --version
andnode_modules/.bin/mocha --version
: No global install,node_modules/.bin/mocha --version
is 9.2.1node --version
: v16.13.2Additional Information
./node_modules/mocha/bin/mocha
without the--dry-run
flag.--dry-run
flag, e.g. this slightly modifiedtest.js
runs fine:The text was updated successfully, but these errors were encountered: