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:
himself65 authored and Michaël Zasso committed 2020-04-22 17:34:44 +02:00
1 parent c439d83dbf
commit bee009d271
1 file changed
+3 -3
+3 -3
View File
@@ -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);
});
}));