test: add test for one arg timers to increase coverage

PR-URL: https://github.com/nodejs/node/pull/54007
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Carlos Espa 2024-07-25 19:12:51 +02:00 committed by GitHub
parent 049c894350
commit 798ca7ed10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,3 +79,8 @@ setTimeout(common.mustCall(() => {
// Test 10 ms timeout separately.
setTimeout(common.mustCall(), 10);
setInterval(common.mustCall(function() { clearInterval(this); }), 10);
// Test no timeout separately
setTimeout(common.mustCall());
// eslint-disable-next-line no-restricted-syntax
setInterval(common.mustCall(function() { clearInterval(this); }));