diff options
author | tyankatsu <frips.ryilsufupe+dev@gmail.com> | 2020-10-28 23:18:14 +0900 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-10-31 04:47:12 -0700 |
commit | 5dd344a2a8a70d8c3b6e570c00b72f03d2801a84 (patch) | |
tree | a052e7bb022fe3e9bddb87f20c221513cb4added | |
parent | 65c9d678ed959d9274cf784dbdb281c2b6d77d0a (diff) | |
download | node-new-5dd344a2a8a70d8c3b6e570c00b72f03d2801a84.tar.gz |
test: add test to fs/promises setImmediate
Add test pattern to setImmediate when ref's type is not boolean
PR-URL: https://github.com/nodejs/node/pull/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>
-rw-r--r-- | test/parallel/test-timers-promisified.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/parallel/test-timers-promisified.js b/test/parallel/test-timers-promisified.js index 6cd932a2d1..bd52d2166c 100644 --- a/test/parallel/test-timers-promisified.js +++ b/test/parallel/test-timers-promisified.js @@ -105,6 +105,12 @@ process.on('multipleResolves', common.mustNotCall()); })).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)), { code: 'ERR_INVALID_ARG_TYPE' |