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

Function doWriteInvalidIterable

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

Source from the content-addressed store, hash-verified

87}
88
89async function doWriteInvalidIterable() {
90 await Promise.all(
91 [42, 42n, {}, Symbol('42'), true, undefined, null, NaN].map((value) =>
92 assert.rejects(fsPromises.writeFile(dest, iterableWith(value)), {
93 code: 'ERR_INVALID_ARG_TYPE',
94 })
95 )
96 );
97}
98
99async function doWriteIterableWithEncoding() {
100 await fsPromises.writeFile(dest, stream2, 'latin1');

Callers 1

Calls 5

allMethod · 0.80
iterableWithFunction · 0.70
mapMethod · 0.65
SymbolFunction · 0.50
writeFileMethod · 0.45

Tested by

no test coverage detected