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