Skip to content

Commit a679669

Browse files
avivkellertargos
authored andcommitted
test: improve coverage for timer promises schedular
PR-URL: #53370 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3077f6a commit a679669

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/parallel/test-timers-promises-scheduler.js

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const { setTimeout } = require('timers');
77
const {
88
strictEqual,
99
rejects,
10+
throws,
1011
} = require('assert');
1112

1213
async function testYield() {
@@ -48,3 +49,7 @@ async function testCancelableWait2() {
4849
}
4950

5051
testCancelableWait2().then(common.mustCall());
52+
53+
throws(() => new scheduler.constructor(), {
54+
code: 'ERR_ILLEGAL_CONSTRUCTOR',
55+
});

0 commit comments

Comments
 (0)