From a571a3fed1f417be849d4011a8e76e39e99de0d8 Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Thu, 5 May 2022 20:48:46 +0900 Subject: [PATCH] test: use`mustSucceed` instead of `mustCall` with `assert.ifError` PR-URL: https://github.com/nodejs/node/pull/42806 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Darshan Sen --- test/parallel/test-fs-opendir.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-fs-opendir.js b/test/parallel/test-fs-opendir.js index 1a4aded61dcd1a..dd1724aa3c2fc6 100644 --- a/test/parallel/test-fs-opendir.js +++ b/test/parallel/test-fs-opendir.js @@ -67,18 +67,16 @@ const invalidCallbackObj = { // Check the opendir async version fs.opendir(testDir, common.mustSucceed((dir) => { let sync = true; - dir.read(common.mustCall((err, dirent) => { + dir.read(common.mustSucceed((dirent) => { assert(!sync); - assert.ifError(err); // Order is operating / file system dependent assert(files.includes(dirent.name), `'files' should include ${dirent}`); assertDirent(dirent); let syncInner = true; - dir.read(common.mustCall((err, dirent) => { + dir.read(common.mustSucceed((dirent) => { assert(!syncInner); - assert.ifError(err); dir.close(common.mustSucceed()); }));