Skip to content
New issue

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

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

Already on GitHub? # to your account

properly dispose Mocha instance in watch mode; closes #4495 #4496

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

boneskull
Copy link
Contributor

  • Mocha instance needed a dispose() call before re-instantiation
  • Exposed sleep() in integration test helpers

Ref: #4495

@boneskull boneskull added semver-patch implementation requires increase of "patch" version number; "bug fixes" area: node.js command-line-or-Node.js-specific labels Nov 2, 2020
@boneskull boneskull added this to the next milestone Nov 2, 2020
@boneskull boneskull self-assigned this Nov 2, 2020
@@ -415,8 +415,12 @@ async function runMochaWatchAsync(args, opts, change) {
if (typeof opts === 'string') {
opts = {cwd: opts};
}
opts = {sleepMs: 2000, ...opts, fork: process.platform === 'win32'};
opts.stdio = ['pipe', 'pipe', 'inherit'];
opts = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was preventing watch mode tests from examining STDERR

@@ -539,24 +543,25 @@ function sleep(time) {
module.exports = {
DEFAULT_FIXTURE,
SPLIT_DOT_REPORTER_REGEXP,
copyFixture,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorted this

@coveralls
Copy link

coveralls commented Nov 2, 2020

Coverage Status

Coverage increased (+0.03%) to 94.067% when pulling 014a1b9 on boneskull/issue/4495-watch-leak into c3ced39 on master.

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
@boneskull boneskull force-pushed the boneskull/issue/4495-watch-leak branch from 97b4dcd to 014a1b9 Compare November 2, 2020 21:38
@boneskull boneskull merged commit 27cae39 into master Nov 2, 2020
@boneskull boneskull deleted the boneskull/issue/4495-watch-leak branch November 2, 2020 22:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area: node.js command-line-or-Node.js-specific semver-patch implementation requires increase of "patch" version number; "bug fixes"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants