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

Function doAsyncIterInvalidCallbackTest

test/parallel/test-fs-opendir.js:237–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235
236// Check that when passing a string instead of function - throw an exception
237async function doAsyncIterInvalidCallbackTest() {
238 const dir = await fs.promises.opendir(testDir);
239 assert.throws(() => dir.close('not function'), invalidCallbackObj);
240 dir.close();
241}
242doAsyncIterInvalidCallbackTest().then(common.mustCall());
243
244// Check first call to close() - should not report an error.

Callers 1

test-fs-opendir.jsFile · 0.85

Calls 2

opendirMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…