-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
test: fs.write() if 3rd argument is a callback, not offset #16822
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
Conversation
test/parallel/test-fs-write.js
Outdated
|
|
||
| fs.open(fn, 'w', 0o644, common.mustCall(function(err, fd) { | ||
| assert.ifError(err); | ||
| console.log('open done'); |
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.
I think these console statements can be left out.
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.
done, thanks!
| fs.open(fn, 'w', 0o644, common.mustCall(function(err, fd) { | ||
| assert.ifError(err); | ||
| const done = common.mustCall(function(err, written) { | ||
| assert.strictEqual(Buffer.byteLength(expected), written); |
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.
Maybe add an assert.ifError(err); here.
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.
Thanks
|
New PR without conflicts #17045 |
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes