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