Skip to content

Commit

Permalink
test: add comment describing test-fs-mkdir
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Jennifer Bland authored and addaleax committed Aug 23, 2018
1 parent a65c633 commit d8ef981
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/parallel/test-fs-mkdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function nextdir() {
return `test${++dirc}`;
}

// mkdir creates directory using assigned path
{
const pathname = path.join(tmpdir.path, nextdir());

Expand All @@ -42,6 +43,7 @@ function nextdir() {
}));
}

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

Expand All @@ -51,6 +53,7 @@ function nextdir() {
}));
}

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

Expand All @@ -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()),
Expand Down

0 comments on commit d8ef981

Please sign in to comment.