summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-chdir-errormessage.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-05-04 21:34:28 -0700
committerAnna Henningsen <anna@addaleax.net>2018-05-05 13:41:57 +0200
commit2fda625b201c15e368a205bcf43f492ddb071cc2 (patch)
tree1302fc075ba6c3451dcb586db6129987425bc730 /test/parallel/test-process-chdir-errormessage.js
parent17a4421b6902992483c7ae0fe58cf7f2c660cd28 (diff)
downloadandroid-node-v8-2fda625b201c15e368a205bcf43f492ddb071cc2.tar.gz
android-node-v8-2fda625b201c15e368a205bcf43f492ddb071cc2.tar.bz2
android-node-v8-2fda625b201c15e368a205bcf43f492ddb071cc2.zip
test: rename misnamed test
Rename test-fs-chdir-errormessage.js to test-process.chdir-errormessage.js. The test is for process.chdir(). There is no fs.chdir(). PR-URL: https://github.com/nodejs/node/pull/20532 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/parallel/test-process-chdir-errormessage.js')
-rw-r--r--test/parallel/test-process-chdir-errormessage.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/parallel/test-process-chdir-errormessage.js b/test/parallel/test-process-chdir-errormessage.js
new file mode 100644
index 0000000000..e511688cc7
--- /dev/null
+++ b/test/parallel/test-process-chdir-errormessage.js
@@ -0,0 +1,14 @@
+'use strict';
+
+const { expectsError } = require('../common');
+
+expectsError(
+ () => {
+ process.chdir('does-not-exist');
+ },
+ {
+ type: Error,
+ code: 'ENOENT',
+ message: "ENOENT: no such file or directory, chdir 'does-not-exist'",
+ }
+);