-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 627 #746
Issue 627 #746
Conversation
Codecov Report
@@ Coverage Diff @@
## master #746 +/- ##
==========================================
+ Coverage 86.71% 86.88% +0.17%
==========================================
Files 16 16
Lines 1739 1739
==========================================
+ Hits 1508 1511 +3
+ Misses 231 228 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great to get extra test coverage. I've included a few requests to make the checks more specific, and to clarify some things. Should be good to go after these fixes.
Thanks for working on these tests.
… is too long, check the type of error that a test returns
Made the changes -- hope these are good to go! Thanks for reviewing my work! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is looking good, thanks for making these fixes. I have one more I'd ask that you do, then I think it's ready.
const fs = util.fs(); | ||
const buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); | ||
|
||
fs.write('/myfile', buffer, 0, buffer.length, 0, function(error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fs.write
takes an fd
, so passing it a filepath as a string
is really testing what we do when we don't pass an fd
. If I do this in node, it throws. Probably returning EBADF
is OK here, since it literally is a bad file descriptor.
That said, let's adjust the message on line 69 to be more clear: it('should fail if given a file path vs. an fd'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for working through these reviews.
Fixes #627 by adding 3 tests to fs.write():