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>
This commit is contained in:
Jennifer Bland authored and Michaël Zasso committed 2018-09-25 08:53:37 +02:00
1 parent 7e45daf494
commit a3b3485b34
1 file changed
+5
+5
View File
@@ -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()),