aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-mkdir-rmdir.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-fs-mkdir-rmdir.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-fs-mkdir-rmdir.js')
-rw-r--r--test/parallel/test-fs-mkdir-rmdir.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-fs-mkdir-rmdir.js b/test/parallel/test-fs-mkdir-rmdir.js
index ff0da82bdf..5e4982ba85 100644
--- a/test/parallel/test-fs-mkdir-rmdir.js
+++ b/test/parallel/test-fs-mkdir-rmdir.js
@@ -10,11 +10,11 @@ const d = path.join(tmpdir.path, 'dir');
tmpdir.refresh();
// Make sure the directory does not exist
-assert(!common.fileExists(d));
+assert(!fs.existsSync(d));
// Create the directory now
fs.mkdirSync(d);
// Make sure the directory exists
-assert(common.fileExists(d));
+assert(fs.existsSync(d));
// Try creating again, it should fail with EEXIST
assert.throws(function() {
fs.mkdirSync(d);
@@ -22,7 +22,7 @@ assert.throws(function() {
// Remove the directory now
fs.rmdirSync(d);
// Make sure the directory does not exist
-assert(!common.fileExists(d));
+assert(!fs.existsSync(d));
// Similarly test the Async version
fs.mkdir(d, 0o666, common.mustCall(function(err) {