We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4193ba commit da07eb6Copy full SHA for da07eb6
test/parallel/test-fs-readfile.js
@@ -70,3 +70,11 @@ for (const e of fileInfo) {
70
}));
71
process.nextTick(() => controller.abort());
72
}
73
+{
74
+ // Verify that if something different than Abortcontroller.signal
75
+ // is passed, ERR_INVALID_ARG_TYPE is thrown
76
+ assert.throws(() => {
77
+ const callback = common.mustNotCall(() => {});
78
+ fs.readFile(fileInfo[0].name, { signal: 'hello' }, callback);
79
+ }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' });
80
+}
0 commit comments