Skip to content

Commit f0a9478

Browse files
test: close dirs in fs-opendir test
PR-URL: #58855 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 1c2fa7e commit f0a9478

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/parallel/test-fs-opendir.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ for (const bufferSize of ['', '1', null]) {
229229
async function doAsyncIterInvalidCallbackTest() {
230230
const dir = await fs.promises.opendir(testDir);
231231
assert.throws(() => dir.close('not function'), invalidCallbackObj);
232+
dir.close();
232233
}
233234
doAsyncIterInvalidCallbackTest().then(common.mustCall());
234235

@@ -257,6 +258,7 @@ doConcurrentAsyncAndSyncOps().then(common.mustCall());
257258
{
258259
const dir = fs.opendirSync(testDir);
259260
assert.throws(() => dir.read('INVALID_CALLBACK'), /ERR_INVALID_ARG_TYPE/);
261+
dir.close();
260262
}
261263

262264
// Check that concurrent read() operations don't do weird things.

0 commit comments

Comments
 (0)