MCPcopy Index your code
hub / github.com/nodejs/node / doWriteStreamWithCancel

Function doWriteStreamWithCancel

test/parallel/test-fs-promises-writefile.js:73–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73async function doWriteStreamWithCancel() {
74 const controller = new AbortController();
75 const { signal } = controller;
76 process.nextTick(() => controller.abort());
77 await assert.rejects(
78 fsPromises.writeFile(otherDest, stream, { signal }),
79 { name: 'AbortError' }
80 );
81}
82
83async function doWriteIterable() {
84 await fsPromises.writeFile(dest, iterable);

Callers 1

Calls 2

abortMethod · 0.95
writeFileMethod · 0.45

Tested by

no test coverage detected