Skip to content

Commit

Permalink
Review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
andreubotella committed Jul 12, 2022
1 parent 60bdf18 commit a38e02b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-process-beforeexit.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ function tryRepeatedTimer() {
if (++n < N)
setTimeout(repeatedTimer, 1);
else // n == N
process.once('beforeExit', common.mustCall(tryNextTick1));
process.once('beforeExit', common.mustCall(tryNextTickSetImmediate));
}, N);
setTimeout(repeatedTimer, 1);
}

// Test if the callback of `process.nextTick` can be invoked.
function tryNextTick1() {
function tryNextTickSetImmediate() {
process.nextTick(common.mustCall(function() {
setImmediate(common.mustCall(() => {
process.once('beforeExit', common.mustCall(tryNextTick2));
process.once('beforeExit', common.mustCall(tryNextTick));
}));
}));
}

// Test that `process.nextTick` won't keep the event loop running by itself.
function tryNextTick2() {
function tryNextTick() {
process.nextTick(common.mustCall(function() {
process.once('beforeExit', common.mustNotCall());
}));
Expand Down

0 comments on commit a38e02b

Please sign in to comment.