test: close dirs in fs-opendir test

PR-URL: https://github.com/nodejs/node/pull/58855
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Livia Medeiros authored and Antoine du Hamel committed 2025-07-24 20:08:29 +02:00
1 parent 6b30c0a511
commit e24dede403
1 file changed
+2
+2
View File
@@ -230,6 +230,7 @@ for (const bufferSize of ['', '1', null]) {
async function doAsyncIterInvalidCallbackTest() {
const dir = await fs.promises.opendir(testDir);
assert.throws(() => dir.close('not function'), invalidCallbackObj);
dir.close();
}
doAsyncIterInvalidCallbackTest().then(common.mustCall());
@@ -258,6 +259,7 @@ doConcurrentAsyncAndSyncOps().then(common.mustCall());
{
const dir = fs.opendirSync(testDir);
assert.throws(() => dir.read('INVALID_CALLBACK'), /ERR_INVALID_ARG_TYPE/);
dir.close();
}
// Check that concurrent read() operations don't do weird things.