Skip to content

Commit 66ad4be

Browse files
tyankatsu0105targos
authored andcommitted
test: add test to fs/promises setImmediate
Add test pattern to setImmediate when ref's type is not boolean PR-URL: #35852 Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 644c416 commit 66ad4be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/parallel/test-timers-promisified.js

+6
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ process.on('multipleResolves', common.mustNotCall());
104104
code: 'ERR_INVALID_ARG_TYPE'
105105
})).then(common.mustCall());
106106

107+
Promise.all(
108+
[1, '', Infinity, null, {}].map(
109+
(ref) => assert.rejects(setImmediate(10, { ref })), {
110+
code: 'ERR_INVALID_ARG_TYPE'
111+
})).then(common.mustCall());
112+
107113
Promise.all(
108114
[1, '', false, Infinity].map(
109115
(i) => assert.rejects(setTimeout(10, null, i)), {

0 commit comments

Comments
 (0)