Skip to content

Commit e24dede

Browse files
LiviaMedeirosaduh95
authored andcommitted
test: close dirs in fs-opendir test
PR-URL: #58855 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 6b30c0a commit e24dede

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
@@ -230,6 +230,7 @@ for (const bufferSize of ['', '1', null]) {
230230
async function doAsyncIterInvalidCallbackTest() {
231231
const dir = await fs.promises.opendir(testDir);
232232
assert.throws(() => dir.close('not function'), invalidCallbackObj);
233+
dir.close();
233234
}
234235
doAsyncIterInvalidCallbackTest().then(common.mustCall());
235236

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

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

0 commit comments

Comments
 (0)