mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test: increase read file abort coverage
PR-URL: https://github.com/nodejs/node/pull/36716 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
b353549f7c
commit
8f580df5ac
1 file changed
+8
@@ -76,3 +76,11 @@ for (const e of fileInfo) {
|
||||
}));
|
||||
process.nextTick(() => controller.abort());
|
||||
}
|
||||
{
|
||||
// Verify that if something different than Abortcontroller.signal
|
||||
// is passed, ERR_INVALID_ARG_TYPE is thrown
|
||||
assert.throws(() => {
|
||||
const callback = common.mustNotCall(() => {});
|
||||
fs.readFile(fileInfo[0].name, { signal: 'hello' }, callback);
|
||||
}, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' });
|
||||
}
|
||||
Reference in new issue
Block a user