From 569c2899785d06ebd1437f5efb94cc9f6d6c6582 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 11 Jan 2022 17:53:34 -0500 Subject: [PATCH] test: do not OR F_OK in fs.access() test access() does not support OR'ing F_OK with other constants. This commit updates test-fs-access.js to not test that scenario. --- test/parallel/test-fs-access.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js index 9fa4dfcf1fe4d8..d8e1c94300d2ed 100644 --- a/test/parallel/test-fs-access.js +++ b/test/parallel/test-fs-access.js @@ -82,10 +82,10 @@ fs.access(__filename, fs.R_OK, common.mustCall(function(...args) { fs.promises.access(__filename, fs.R_OK) .then(common.mustCall()) .catch(throwNextTick); -fs.access(readOnlyFile, fs.F_OK | fs.R_OK, common.mustCall(function(...args) { +fs.access(readOnlyFile, fs.R_OK, common.mustCall(function(...args) { assert.deepStrictEqual(args, [null]); })); -fs.promises.access(readOnlyFile, fs.F_OK | fs.R_OK) +fs.promises.access(readOnlyFile, fs.R_OK) .then(common.mustCall()) .catch(throwNextTick); @@ -153,7 +153,7 @@ assert.throws( // Regular access should not throw. fs.accessSync(__filename); -const mode = fs.F_OK | fs.R_OK | fs.W_OK; +const mode = fs.R_OK | fs.W_OK; fs.accessSync(readWriteFile, mode); // Invalid modes should throw.