Sha256: 55529c69e9648f374e65bd408e17eba08578f45ceb5bb851ae1e3cb48e6f399e

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

'use strict';
const common = require('../common');

// This test ensures that if an Immediate callback clears subsequent
// immediates we don't get stuck in an infinite loop.
//
// If the process does get stuck, it will be timed out by the test
// runner.
//
// Ref: https://github.com/nodejs/node/issues/9756

setImmediate(common.mustCall(function() {
  clearImmediate(i2);
  clearImmediate(i3);
}));

const i2 = setImmediate(function() {
  common.fail('immediate callback should not have fired');
});

const i3 = setImmediate(function() {
  common.fail('immediate callback should not have fired');
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
node-compiler-0.9.1 vendor/node/test/parallel/test-timers-regress-GH-9765.js