mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: improve test-fs-existssync-false.js
PR-URL: https://github.com/nodejs/node/pull/31883 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
c439d83dbf
commit
bee009d271
1 file changed
+3
-3
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
const tmpdir = require('../common/tmpdir');
|
||||
|
||||
// This test ensures that fs.existsSync doesn't incorrectly return false.
|
||||
@@ -31,6 +31,6 @@ for (let i = 0; i < 50; i++) {
|
||||
assert(fs.existsSync(dir), 'Directory is not accessible');
|
||||
|
||||
// Test if file exists asynchronously
|
||||
fs.access(dir, function(err) {
|
||||
fs.access(dir, common.mustCall((err) => {
|
||||
assert.ifError(err);
|
||||
});
|
||||
}));
|
||||
Reference in new issue
Block a user