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 c308b06 commit cf8d025Copy full SHA for cf8d025
test/parallel/test-fs-promises-readfile.js
@@ -61,10 +61,22 @@ function validateReadFileAbortLogicDuring(){
61
});
62
}
63
64
+asyncfunctionvalidateWrongSignalParam(){
65
+// Verify that if something different than Abortcontroller.signal
66
+// is passed, ERR_INVALID_ARG_TYPE is thrown
67
+
68
+awaitassert.rejects(async()=>{
69
+constcallback=common.mustNotCall(()=>{});
70
+awaitreadFile(fn,{signal: 'hello'},callback);
71
+},{code: 'ERR_INVALID_ARG_TYPE',name: 'TypeError'});
72
73
+}
74
75
(async()=>{
76
awaitcreateLargeFile();
77
awaitvalidateReadFile();
78
awaitvalidateReadFileProc();
79
awaitvalidateReadFileAbortLogicBefore();
80
awaitvalidateReadFileAbortLogicDuring();
81
+awaitvalidateWrongSignalParam();
82
})().then(common.mustCall());
0 commit comments