• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3
4// This test ensures that if an Immediate callback clears subsequent
5// immediates we don't get stuck in an infinite loop.
6//
7// If the process does get stuck, it will be timed out by the test
8// runner.
9//
10// Ref: https://github.com/nodejs/node/issues/9756
11
12setImmediate(common.mustCall(function() {
13  clearImmediate(i2);
14  clearImmediate(i3);
15}));
16
17const i2 = setImmediate(common.mustNotCall());
18
19const i3 = setImmediate(common.mustNotCall());
20