From b23d1c37b9a9e803c50aff12b9f932610fbcf87b Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:52:10 -0400 Subject: [PATCH] test: improve coverage for timer promises schedular PR-URL: https://github.com/nodejs/node/pull/53370 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-timers-promises-scheduler.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parallel/test-timers-promises-scheduler.js b/test/parallel/test-timers-promises-scheduler.js index 7caf92fdf6a..4eda43586f6 100644 --- a/test/parallel/test-timers-promises-scheduler.js +++ b/test/parallel/test-timers-promises-scheduler.js @@ -7,6 +7,7 @@ const { setTimeout } = require('timers'); const { strictEqual, rejects, + throws, } = require('assert'); async function testYield() { @@ -48,3 +49,7 @@ async function testCancelableWait2() { } testCancelableWait2().then(common.mustCall()); + +throws(() => new scheduler.constructor(), { + code: 'ERR_ILLEGAL_CONSTRUCTOR', +});