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

Function doWriteAsyncIterable

test/parallel/test-fs-promises-file-handle-writeFile.js:162–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160}
161
162async function doWriteAsyncIterable() {
163 const fileHandle = await open(dest, 'w+');
164 try {
165 await fileHandle.writeFile(asyncIterable);
166 const data = fs.readFileSync(dest, 'utf-8');
167 assert.deepStrictEqual(data, asyncIterable.expected);
168 } finally {
169 await fileHandle.close();
170 }
171}
172
173async function doWriteInvalidValues() {
174 const fileHandle = await open(dest, 'w+');

Calls 4

openFunction · 0.70
closeMethod · 0.65
writeFileMethod · 0.45
readFileSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…