diff options
Diffstat (limited to 'tests/node_compat/test/parallel/test-timers-clearImmediate.js')
-rw-r--r-- | tests/node_compat/test/parallel/test-timers-clearImmediate.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/node_compat/test/parallel/test-timers-clearImmediate.js b/tests/node_compat/test/parallel/test-timers-clearImmediate.js new file mode 100644 index 000000000..129e301f2 --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-clearImmediate.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 18.12.1 +// This file is automatically generated by `tools/node_compat/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +const N = 3; + +function next() { + const fn = common.mustCall(() => clearImmediate(immediate)); + const immediate = setImmediate(fn); +} + +for (let i = 0; i < N; i++) { + next(); +} |