mirror of
https://github.com/denoland/deno.git
synced 2024-12-19 05:45:09 -05:00
27 lines
767 B
JavaScript
27 lines
767 B
JavaScript
|
// deno-fmt-ignore-file
|
||
|
// deno-lint-ignore-file
|
||
|
|
||
|
// Copyright Joyent and Node contributors. All rights reserved. MIT license.
|
||
|
// Taken from Node 20.11.1
|
||
|
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
|
||
|
|
||
|
'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(common.mustNotCall());
|
||
|
|
||
|
const i3 = setImmediate(common.mustNotCall());
|