aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-child-process-spawn-error.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-08-06 06:47:11 -0700
committerRich Trott <rtrott@gmail.com>2018-08-08 09:17:44 -0700
commit41ae423718cb312c52c7b3bca1988130a2c417f6 (patch)
tree9882b9329f7a6c4ddd093702092ddea87523ea3f /test/parallel/test-child-process-spawn-error.js
parent6ad12d47f5cd0382c2011a3a1c3f0e8601c07f69 (diff)
downloadandroid-node-v8-41ae423718cb312c52c7b3bca1988130a2c417f6.tar.gz
android-node-v8-41ae423718cb312c52c7b3bca1988130a2c417f6.tar.bz2
android-node-v8-41ae423718cb312c52c7b3bca1988130a2c417f6.zip
test: remove common.fileExists()
common.fileExists() can be replaced with fs.existsSync(). PR-URL: https://github.com/nodejs/node/pull/22151 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'test/parallel/test-child-process-spawn-error.js')
-rw-r--r--test/parallel/test-child-process-spawn-error.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-child-process-spawn-error.js b/test/parallel/test-child-process-spawn-error.js
index 109effa5c8..28591f88fa 100644
--- a/test/parallel/test-child-process-spawn-error.js
+++ b/test/parallel/test-child-process-spawn-error.js
@@ -23,10 +23,11 @@
const common = require('../common');
const spawn = require('child_process').spawn;
const assert = require('assert');
+const fs = require('fs');
const enoentPath = 'foo123';
const spawnargs = ['bar'];
-assert.strictEqual(common.fileExists(enoentPath), false);
+assert.strictEqual(fs.existsSync(enoentPath), false);
const enoentChild = spawn(enoentPath, spawnargs);
enoentChild.on('error', common.mustCall(function(err) {