| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Thank you! Two optional suggestions, but this looks good
Sorry, something went wrong.
| }); | ||
|
|
||
| test('-p flag: existing directory', t => { | ||
| shell.mkdir('-p', `${t.context.tmp}/existing`); |
There was a problem hiding this comment.
Remove the '-p' from this call, to make it clearer that this is part of the setup and not the real test (which is the next call to shell.mkdir('-p', ...)).
Sorry, something went wrong.
| }); | ||
|
|
||
| test('-p flag: create new subdirectory within existing tree', t => { | ||
| shell.mkdir('-p', `${t.context.tmp}/grandparent/parent`); |
There was a problem hiding this comment.
suggestion: let's remove parent from this call (but leave it in the next call).
Then in the portion of the test below, let's have calls to fs.existsSync() for both '.../parent' and '.../parent/child' to verify both directories are created. This will give us test coverage that mkdir('-p') can create multiple directories in the hierarchy while also testing that we can work within an existing directory tree.
Sorry, something went wrong.
Signed-off-by: MD-Mushfiqur123 <md.mushfiqur.rahim123@gmail.com>
| Back | FazBrowse Home | New Git URL |
Adds test cases for on directories that already exist:
Fixes #1022