test: check parameter type of fs.mkdir()#22616
Closed
shisama wants to merge 4 commits intonodejs:masterfrom
Closed
test: check parameter type of fs.mkdir()#22616shisama wants to merge 4 commits intonodejs:masterfrom
shisama wants to merge 4 commits intonodejs:masterfrom
Conversation
Added tests to check parameter type of fs.mkdir(), fs.mkdirSync() and fsPromises.mkdir() to increase coverage.
cjihrig
approved these changes
Aug 31, 2018
Contributor
cjihrig
left a comment
There was a problem hiding this comment.
A couple nits. LGTM once the CI passes.
test/parallel/test-fs-mkdir.js
Outdated
| const pathname = path.join(tmpdir.path, nextdir()); | ||
| ['', 1, {}, [], null, Symbol('test'), () => {}].forEach((i) => { | ||
| common.expectsError( | ||
| () => fs.mkdir(pathname, { recursive: i }, common.mustNotCall()), |
Contributor
There was a problem hiding this comment.
Could you rename i to recursive, and this can just be { recursive }.
Contributor
Author
There was a problem hiding this comment.
Thank you for your review. Fixed this.
test/parallel/test-fs-promises.js
Outdated
| const dir = path.join(tmpDir, nextdir(), nextdir()); | ||
| ['', 1, {}, [], null, Symbol('test'), () => {}].forEach((i) => { | ||
| assert.rejects( | ||
| // mkdtemp() expects to get a string prefix. |
Contributor
Author
There was a problem hiding this comment.
oh, sorry. this is wrong copy and paste. Fixed this.
BridgeAR
approved these changes
Aug 31, 2018
BridgeAR
reviewed
Aug 31, 2018
test/parallel/test-fs-promises.js
Outdated
| ['', 1, {}, [], null, Symbol('test'), () => {}].forEach((recursive) => { | ||
| assert.rejects( | ||
| // mkdir() expects to get a boolean value for options.recursive. | ||
| async () => mkdir(dir, { recursive: i }), |
Member
There was a problem hiding this comment.
Small oversight: it should be recursive without : i
Contributor
Author
There was a problem hiding this comment.
Thank you for your review. I fixed this.
Member
jasnell
approved these changes
Sep 4, 2018
trivikr
approved these changes
Sep 4, 2018
gdams
approved these changes
Sep 4, 2018
Member
|
landed in: fdf829e |
gdams
pushed a commit
that referenced
this pull request
Sep 4, 2018
Added tests to check parameter type of fs.mkdir(), fs.mkdirSync() and fsPromises.mkdir() to increase coverage. PR-URL: #22616 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
targos
pushed a commit
that referenced
this pull request
Sep 12, 2018
Added tests to check parameter type of fs.mkdir(), fs.mkdirSync() and fsPromises.mkdir() to increase coverage. PR-URL: #22616 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
targos
pushed a commit
that referenced
this pull request
Sep 19, 2018
Added tests to check parameter type of fs.mkdir(), fs.mkdirSync() and fsPromises.mkdir() to increase coverage. PR-URL: #22616 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
Member
|
Depends on #21875. Marking |
4 tasks
targos
pushed a commit
that referenced
this pull request
Sep 25, 2018
Added tests to check parameter type of fs.mkdir(), fs.mkdirSync() and fsPromises.mkdir() to increase coverage. PR-URL: #22616 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
This was referenced Oct 10, 2018
This was referenced Oct 11, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added tests to check parameter type of fs.mkdir(), fs.mkdirSync()
and fsPromises.mkdir() to increase coverage.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes