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

Function implicitCall

test/parallel/test-fs-promises-file-handle-dispose.js:25–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25async function implicitCall() {
26 let fh;
27 {
28 await using openHandle = await fs.open(__filename);
29 fh = openHandle;
30 fh.on('close', common.mustCall());
31 }
32 assert.strictEqual(fh.fd, -1);
33
34 let dh;
35 {
36 await using dirHandle = await fs.opendir(__dirname);
37 dh = dirHandle;
38 }
39 await assert.rejects(dh.read(), { code: 'ERR_DIR_CLOSED' });
40
41 let dhSync;
42 {
43 using dirHandleSync = opendirSync(__dirname);
44 dhSync = dirHandleSync;
45 }
46 assert.throws(() => dhSync.readSync(), { code: 'ERR_DIR_CLOSED' });
47}
48
49explicitCall().then(common.mustCall());
50implicitCall().then(common.mustCall());

Calls 6

opendirSyncFunction · 0.85
opendirMethod · 0.80
openMethod · 0.65
onMethod · 0.45
readMethod · 0.45
readSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…