Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/parallel/test-domain-exit-dispose.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function err() {
console.error('This should not happen.');
disposalFailed = true;
process.exit(1);
});
}, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

@qualquervalor2 Could you check if this works with setImmediate() instead of setTimeout()?

If it doesn't work, could you change the 0 to a 1? The 0 becomes a 1 under the hood so it would be better to be explicit up front. :)

Copy link
Author

Choose a reason for hiding this comment

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

setImediate() did not work. Updated the PR to use 1.


// this function doesn't exist, and throws an error as a result.
err3(); // eslint-disable-line no-undef
Expand All @@ -41,7 +41,7 @@ function err() {
}

process.on('exit', function() {
assert.equal(a, 10);
assert.equal(disposalFailed, false);
assert.strictEqual(a, 10);
assert.strictEqual(disposalFailed, false);
console.log('ok');
});