From bee009d271e5aec608f00ee0d00181d6a65c16de 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 PR-URL: https://github.com/nodejs/node/pull/31883 Reviewed-By: Gireesh Punathil Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Richard Lau Reviewed-By: James M Snell --- 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); -}); +}));