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 <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>
  • Loading branch information
Jennifer Bland authored and targos committed Sep 25, 2018
1 parent 7e45daf commit a3b3485
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 a3b3485

Please sign in to comment.