mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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. PR-URL: https://github.com/nodejs/node/pull/41484 Refs: https://github.com/libuv/libuv/pull/3410 Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen
This commit is contained in:
1 parent
9dd097325a
commit
9242c1900c
1 file changed
+3
-3
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user