diff options
author | MURAKAMI Masahiko <m-murakami@esm.co.jp> | 2022-05-05 14:48:46 +0300 |
---|---|---|
committer | RafaelGSS <rafael.nunu@hotmail.com> | 2022-05-10 15:13:18 +0300 |
commit | b1c18edaa9dc67fccc1e16c5d72bbaa5fa08ff63 (patch) | |
tree | aa657b64398462529fa125091b600bca48ad91a6 /test | |
parent | 2dc795687a8477bacfe686adaa5a644fd8bebcf2 (diff) |
test: use`mustSucceed` instead of `mustCall` with `assert.ifError`
PR-URL: https://github.com/nodejs/node/pull/42806
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-fs-opendir.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/parallel/test-fs-opendir.js b/test/parallel/test-fs-opendir.js index 1a4aded61dc..dd1724aa3c2 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()); })); |