Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: potential call-stack crash when using 'dry-run' option #4839

Merged
merged 2 commits into from
Mar 4, 2022

Conversation

juergba
Copy link
Contributor

@juergba juergba commented Mar 1, 2022

Description

dry-run mode: since the tests are not executed, but triggered only into an empty synchronous run, there is a potential risk of RangeError: Maximum call stack size exceeded.

Description of the Change

For each test we add an asynchronous function call with Runner.immediately(). We pay a slight performance costs for this which is insignificant in dry-run mode.

Applicable issues

closes #4838

@juergba juergba self-assigned this Mar 1, 2022
@juergba juergba added the semver-patch implementation requires increase of "patch" version number; "bug fixes" label Mar 1, 2022
@juergba juergba added this to the next milestone Mar 1, 2022
@juergba juergba requested a review from a team March 1, 2022 16:09
@juergba juergba merged commit 22f9306 into master Mar 4, 2022
@juergba juergba deleted the juergba/dry-run branch March 4, 2022 08:55
KuznetsovRoman pushed a commit to gemini-testing/mocha that referenced this pull request Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch implementation requires increase of "patch" version number; "bug fixes"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when using the --dry-run flag with many suites
1 participant