mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
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:
1 parent
6b30c0a511
commit
e24dede403
1 file changed
+2
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user