MCPcopy Create free account
hub / github.com/nodejs/node / validateWrongSignalParam

Function validateWrongSignalParam

test/parallel/test-fs-promises-readfile.js:61–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59}
60
61async function validateWrongSignalParam() {
62 // Verify that if something different than Abortcontroller.signal
63 // is passed, ERR_INVALID_ARG_TYPE is thrown
64
65 await assert.rejects(async () => {
66 const callback = common.mustNotCall();
67 await readFile(fn, { signal: 'hello' }, callback);
68 }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' });
69
70}
71
72async function validateZeroByteLiar() {
73 const originalFStat = fsBinding.fstat;

Callers 1

Calls 1

readFileFunction · 0.70

Tested by

no test coverage detected