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

Function doConcurrentAsyncAndSyncOps

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

Source from the content-addressed store, hash-verified

251
252// Check that readSync() and closeSync() during read() throw exceptions
253async function doConcurrentAsyncAndSyncOps() {
254 const dir = await fs.promises.opendir(testDir);
255 const promise = dir.read();
256
257 assert.throws(() => dir.closeSync(), dirconcurrentError);
258 assert.throws(() => dir.readSync(), dirconcurrentError);
259
260 await promise;
261 dir.closeSync();
262}
263doConcurrentAsyncAndSyncOps().then(common.mustCall());
264
265// Check read throw exceptions on invalid callback

Callers 1

test-fs-opendir.jsFile · 0.85

Calls 4

opendirMethod · 0.80
readMethod · 0.45
closeSyncMethod · 0.45
readSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…