| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Hi @humphd! Welcome and thanks for the PR! It's possible that some/all of this is duplicated in #19605. Might want to compare and remove anything that's duplicated because that one looks like it's going to land very soon. (As in I'm actually in the middle of landing it RIGHT NOW.) |
Sorry, something went wrong.
Sorry, something went wrong.
|
@Trott OK, thanks, I'll compare with what's landed there and adjust this. |
Sorry, something went wrong.
|
(Lone CI failure is unrelated. Can be re-run if this PR isn't going to change, but if there are any changes, we'll have to re-run all of CI anyway. So, either way...) |
Sorry, something went wrong.
|
@Trott based on what was added in #19057, I've just reverted my changes to test/parallel/test-fs-promises-writefile.js and just included my additions to test/parallel/test-fs-promises.js, which are unmodified from my previous commit. I've also rebased this. |
Sorry, something went wrong.
|
@nodejs/fs @nodejs/testing |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
As a general note: we can actually use the following instead:
assert.rejects(
// `mode` can't be > 0o777
() => fchmod(handle, (0o777 + 1)),
{
code: 'ERR_OUT_OF_RANGE',
name: 'RangeError [ERR_OUT_OF_RANGE]'
}
);
Sorry, something went wrong.
There was a problem hiding this comment.
Nit: can you please remove the console.log here?
Sorry, something went wrong.
There was a problem hiding this comment.
Shouldn't this be compared with buf2?
Sorry, something went wrong.
There was a problem hiding this comment.
Nit: Also, if we reduce magic numbers (like 11 in this case) it would be better.
Sorry, something went wrong.
There was a problem hiding this comment.
It would be better, if did this for chmod as well.
Sorry, something went wrong.
|
@humphd would you be so kind and have a look at the comments? :-) |
Sorry, something went wrong.
|
@BridgeAR apologies for the delay. I'll update this week. |
Sorry, something went wrong.
|
OK, I've rebased and done the following based on the reviews above:
|
Sorry, something went wrong.
Sorry, something went wrong.
|
|
||
| await chmod(dest, 0o666); | ||
| await fchmod(handle, 0o666); | ||
| handle.chmod(0o666); |
There was a problem hiding this comment.
Should this be awaited?
Sorry, something went wrong.
There was a problem hiding this comment.
Indeed, thank you for spotting this. I'll fix.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
OSX CI failure looks unrelated, opened #20660 New CI run: https://ci.nodejs.org/job/node-test-pull-request/14796/ |
Sorry, something went wrong.
|
Landed in fcc46ee 🎉 |
Sorry, something went wrong.
PR-URL: #19811 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: #19811 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
Thanks for landing this @addaleax, and to the rest for your reviews and help spotting mistakes. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I was looking at test coverage for the new things in fs/promises.js and wanted to add some more. This adds test cases using FileHandle objects vs. only using paths or fds.
Due to #19057, I'm unable to run coverage locally on macOS; apologies for not including updated coverage info.