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

Function doAsyncIterBreakTest

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

Source from the content-addressed store, hash-verified

173// Async iterators should do automatic cleanup
174
175async function doAsyncIterBreakTest() {
176 const dir = await fs.promises.opendir(testDir);
177 for await (const dirent of dir) { // eslint-disable-line no-unused-vars
178 break;
179 }
180
181 await assert.rejects(dir.read(), dirclosedError);
182}
183doAsyncIterBreakTest().then(common.mustCall());
184
185async function doAsyncIterReturnTest() {

Callers 1

test-fs-opendir.jsFile · 0.85

Calls 2

opendirMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…