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

Function doWriteIterable

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

Source from the content-addressed store, hash-verified

110}
111
112async function doWriteIterable() {
113 const fileHandle = await open(dest, 'w+');
114 try {
115 await fileHandle.writeFile(iterable);
116 const data = fs.readFileSync(dest, 'utf-8');
117 assert.deepStrictEqual(data, iterable.expected);
118 } finally {
119 await fileHandle.close();
120 }
121}
122
123async function doWriteInvalidIterable() {
124 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…