From 61f4d532cbf5d969d96e1e285e03e0eae3932dd5 Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Thu, 21 Apr 2022 14:12:15 +0900 Subject: [PATCH] test: use`mustSucceed` instead of `mustCall` with `assert.ifError` --- 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()); }));