Skip to content

Commit

Permalink
test: add test to fs/promises setImmediate
Browse files Browse the repository at this point in the history
Add test pattern to setImmediate when ref's type is not boolean

PR-URL: #35852
Reviewed-By: Yosuke Furukawa <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Shingo Inoue <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
tyankatsu0105 authored and targos committed Nov 3, 2020
1 parent 644c416 commit 66ad4be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/parallel/test-timers-promisified.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ process.on('multipleResolves', common.mustNotCall());
code: 'ERR_INVALID_ARG_TYPE'
})).then(common.mustCall());

Promise.all(
[1, '', Infinity, null, {}].map(
(ref) => assert.rejects(setImmediate(10, { ref })), {
code: 'ERR_INVALID_ARG_TYPE'
})).then(common.mustCall());

Promise.all(
[1, '', false, Infinity].map(
(i) => assert.rejects(setTimeout(10, null, i)), {
Expand Down

0 comments on commit 66ad4be

Please sign in to comment.