From c51e3b1871ebe76d63ab3d78fc23828f40f823dd Mon Sep 17 00:00:00 2001 From: himself65 Date: Thu, 20 Feb 2020 15:49:12 +0800 Subject: [PATCH] test: improve test-fs-existssync-false.js --- test/parallel/test-fs-existssync-false.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-fs-existssync-false.js b/test/parallel/test-fs-existssync-false.js index 096be6de38df9b..3808750d7f304a 100644 --- a/test/parallel/test-fs-existssync-false.js +++ b/test/parallel/test-fs-existssync-false.js @@ -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); -}); +}));