node/test/parallel/test-timers-invalid-clear.js
Gürgün Dayıoğlu 6b0af1748c
Some checks failed
Test and upload documentation to artifacts / build-docs (push) Waiting to run
Linters / lint-addon-docs (push) Waiting to run
Linters / lint-cpp (push) Waiting to run
Linters / format-cpp (push) Waiting to run
Linters / lint-js-and-md (push) Waiting to run
Linters / lint-py (push) Waiting to run
Linters / lint-yaml (push) Waiting to run
Linters / lint-sh (push) Waiting to run
Linters / lint-codeowners (push) Waiting to run
Linters / lint-pr-url (push) Waiting to run
Linters / lint-readme (push) Waiting to run
Notify on Push / Notify on Force Push on `main` (push) Waiting to run
Notify on Push / Notify on Push on `main` that lacks metadata (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Coverage Linux (without intl) / coverage-linux-without-intl (push) Has been cancelled
Coverage Linux / coverage-linux (push) Has been cancelled
Coverage Windows / coverage-windows (push) Has been cancelled
Test internet / test-internet (push) Has been cancelled
V8 patch update / v8-update (push) Has been cancelled
OpenSSL update / openssl-update (push) Has been cancelled
Timezone update / timezone_update (push) Has been cancelled
timers: check for immediate instance in clearImmediate
PR-URL: https://github.com/nodejs/node/pull/57069
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2025-03-01 23:54:52 +00:00

14 lines
269 B
JavaScript

'use strict';
const common = require('../common');
// clearImmediate should be a noop if anything other than an Immediate
// is passed to it.
const t = setTimeout(common.mustCall());
clearImmediate(t);
setTimeout(common.mustCall());
setTimeout(common.mustCall());