From a5346713030c3e8d9101d6b7800d222a99a78f78 Mon Sep 17 00:00:00 2001 From: Leko Date: Mon, 4 Dec 2017 16:21:18 +0900 Subject: [PATCH 1/2] test: replace fs.accessSync with common.fileExists --- test/parallel/test-npm-install.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js index 34f48d50ccdb2b..b68e834ef82dfe 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js @@ -57,7 +57,5 @@ function handleExit(error, stdout, stderr) { assert.strictEqual(code, 0, `npm install got error code ${code}`); assert.strictEqual(signalCode, null, `unexpected signal: ${signalCode}`); - assert.doesNotThrow(function() { - fs.accessSync(`${installDir}/node_modules/package-name`); - }); + assert(common.fileExists(`${installDir}/node_modules/package-name`)); } From 025cae679098f16dae93ae6b6b3bc2dadca30a77 Mon Sep 17 00:00:00 2001 From: Leko Date: Wed, 6 Dec 2017 18:49:37 +0900 Subject: [PATCH 2/2] test: replace common.fileExists with fs.existsSync --- test/parallel/test-npm-install.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js index b68e834ef82dfe..d826eb09ed4756 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js @@ -57,5 +57,5 @@ function handleExit(error, stdout, stderr) { assert.strictEqual(code, 0, `npm install got error code ${code}`); assert.strictEqual(signalCode, null, `unexpected signal: ${signalCode}`); - assert(common.fileExists(`${installDir}/node_modules/package-name`)); + assert(fs.existsSync(`${installDir}/node_modules/package-name`)); }