Skip to content

Commit a3b3485

Browse files
Jennifer Blandtargos
Jennifer Bland
authored andcommitted
test: add comment describing test-fs-mkdir
PR-URL: #22424 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ben Coe <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
1 parent 7e45daf commit a3b3485

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/parallel/test-fs-mkdir.js

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function nextdir() {
3333
return `test${++dirc}`;
3434
}
3535

36+
// mkdir creates directory using assigned path
3637
{
3738
const pathname = path.join(tmpdir.path, nextdir());
3839

@@ -42,6 +43,7 @@ function nextdir() {
4243
}));
4344
}
4445

46+
// mkdir creates directory with assigned mode value
4547
{
4648
const pathname = path.join(tmpdir.path, nextdir());
4749

@@ -51,6 +53,7 @@ function nextdir() {
5153
}));
5254
}
5355

56+
// mkdirSync successfully creates directory from given path
5457
{
5558
const pathname = path.join(tmpdir.path, nextdir());
5659

@@ -60,6 +63,8 @@ function nextdir() {
6063
assert.strictEqual(exists, true);
6164
}
6265

66+
// mkdirSync and mkdir require path to be a string, buffer or url.
67+
// Anything else generates an error.
6368
[false, 1, {}, [], null, undefined].forEach((i) => {
6469
common.expectsError(
6570
() => fs.mkdir(i, common.mustNotCall()),

0 commit comments

Comments
 (0)