Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign uptest: add cb error test for fs.close method #29970
Conversation
This comment has been minimized.
This comment has been minimized.
Please call (Or, better, put the test case in a callback, and then have the close be async too. If you do that, make sure you wrap the callbacks in |
This comment has been minimized.
This comment has been minimized.
I wouldn't mind these new lines being block-scoped (add a |
This comment has been minimized.
This comment has been minimized.
Out of curiosity, what caused you to write this test? Were you reviewing coverage.nodejs.org and this test is intended to add coverage where we currently don't have coverage? Or is there a different reason you're doing this? |
LGTM with a closeSync() added after the forEach stuff. |
const errObj = { | ||
code: 'ERR_INVALID_CALLBACK', | ||
name: 'TypeError' | ||
}; |
This comment has been minimized.
This comment has been minimized.
Trott
Oct 15, 2019
Member
Minor nit-pick: You can move the errObj
definition outside of the forEach()
to below the fd
definition. This way, it's only being defined once.
This comment has been minimized.
This comment has been minimized.
I have just took a look to coverage.nodejs.org page and found that this piece of code was not covered. I would like to help you reach 100% coverage :-) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
CI (probably) won't pass until #29979 lands first. If a Collaborator wants to be the second fast-track approval on that PR, thumbs up at #29979 (comment). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@Trott I have to do something to unlock problems with CI or it's not related to my changes and I just have to wait? |
This comment has been minimized.
This comment has been minimized.
CI is passing. The GitHub interface doesn't always update. Not sure if that's a problem with our bot or with GitHub or something else. But this is all good to go. You don't need to do anything but wait for someone to land it. Which I'm going to do right now! |
This comment has been minimized.
This comment has been minimized.
Landed in e22efba. Thanks for the contribution! |
teorossi82 commentedOct 14, 2019
•
edited
Added test on fs.close method when callback is not a function.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes