summaryrefslogtreecommitdiff
path: root/test/parallel/test-timers-next-tick.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-timers-next-tick.js')
-rw-r--r--test/parallel/test-timers-next-tick.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parallel/test-timers-next-tick.js b/test/parallel/test-timers-next-tick.js
index 89ebf6c8c1..1233501366 100644
--- a/test/parallel/test-timers-next-tick.js
+++ b/test/parallel/test-timers-next-tick.js
@@ -1,6 +1,8 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
+const { sleep } = require('internal/util');
// This test verifies that the next tick queue runs after each
// individual Timeout, as well as each individual Immediate.
@@ -16,7 +18,7 @@ const t2 = setTimeout(common.mustNotCall(), 1);
const t3 = setTimeout(common.mustNotCall(), 1);
setTimeout(common.mustCall(), 1);
-common.busyLoop(5);
+sleep(5);
setImmediate(common.mustCall(() => {
process.nextTick(() => {