Skip to content

Commit bee009d

Browse files
himself65targos
authored andcommittedApr 22, 2020
test: improve test-fs-existssync-false.js
PR-URL: #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>
1 parent c439d83 commit bee009d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎test/parallel/test-fs-existssync-false.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
require('../common');
2+
const common = require('../common');
33
const tmpdir = require('../common/tmpdir');
44

55
// This test ensures that fs.existsSync doesn't incorrectly return false.
@@ -31,6 +31,6 @@ for (let i = 0; i < 50; i++) {
3131
assert(fs.existsSync(dir), 'Directory is not accessible');
3232

3333
// Test if file exists asynchronously
34-
fs.access(dir, function(err) {
34+
fs.access(dir, common.mustCall((err) => {
3535
assert.ifError(err);
36-
});
36+
}));

0 commit comments

Comments
 (0)
Please sign in to comment.