diff --git a/test/js/node/timers/timers-immediate-exception-fixture.js b/test/js/node/timers/timers-immediate-exception-fixture.js index 956e8a0a30..bf3bc8bbec 100644 --- a/test/js/node/timers/timers-immediate-exception-fixture.js +++ b/test/js/node/timers/timers-immediate-exception-fixture.js @@ -6,7 +6,7 @@ process.on( if (err.message !== "oops") { throw err; } - }, 2), + }, 3), ); function checkNextTick(expected) { @@ -70,3 +70,37 @@ setImmediate( checkNextTick(7); }), ); + +setImmediate( + mustCall(() => { + counter++; + checkNextTick(8); + setImmediate( + mustCall(() => { + counter++; + checkNextTick(11); + }), + ); + }), +); + +setImmediate( + mustCall(() => { + counter++; + checkNextTick(9); + setImmediate( + mustCall(() => { + counter++; + checkNextTick(12); + throw new Error("oops"); + }), + ); + }), +); + +setImmediate( + mustCall(() => { + counter++; + checkNextTick(10); + }), +);