aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJennifer Bland <jennifer.bland@sbdinc.com>2018-08-20 21:22:33 -0400
committerAnna Henningsen <anna@addaleax.net>2018-08-24 00:45:56 +0200
commitd8ef9811a726c84c4b6803436235642d87ec47ea (patch)
tree3364e5082f2279ab917aa0ee3f51a2c48c8c7d63
parenta65c633738e3f7f7818065e7ea67ad05032e0096 (diff)
downloadandroid-node-v8-d8ef9811a726c84c4b6803436235642d87ec47ea.tar.gz
android-node-v8-d8ef9811a726c84c4b6803436235642d87ec47ea.tar.bz2
android-node-v8-d8ef9811a726c84c4b6803436235642d87ec47ea.zip
test: add comment describing test-fs-mkdir
PR-URL: https://github.com/nodejs/node/pull/22424 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
-rw-r--r--test/parallel/test-fs-mkdir.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/parallel/test-fs-mkdir.js b/test/parallel/test-fs-mkdir.js
index 024fdced9c..f5fecbe157 100644
--- a/test/parallel/test-fs-mkdir.js
+++ b/test/parallel/test-fs-mkdir.js
@@ -33,6 +33,7 @@ function nextdir() {
return `test${++dirc}`;
}
+// mkdir creates directory using assigned path
{
const pathname = path.join(tmpdir.path, nextdir());
@@ -42,6 +43,7 @@ function nextdir() {
}));
}
+// mkdir creates directory with assigned mode value
{
const pathname = path.join(tmpdir.path, nextdir());
@@ -51,6 +53,7 @@ function nextdir() {
}));
}
+// mkdirSync successfully creates directory from given path
{
const pathname = path.join(tmpdir.path, nextdir());
@@ -60,6 +63,8 @@ function nextdir() {
assert.strictEqual(exists, true);
}
+// mkdirSync and mkdir require path to be a string, buffer or url.
+// Anything else generates an error.
[false, 1, {}, [], null, undefined].forEach((i) => {
common.expectsError(
() => fs.mkdir(i, common.mustNotCall()),