-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Simplified the test by using common.mustCall(). Use of common.mustCal… #10040
Conversation
…l(), made assert require and use of successes variable redundant
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.
Could you modify the commit message so that it meets the contributing guidelines?
Something like:
test: refactor test-fs-fsync
Simplified the test by using common.mustCall(). Use of
common.mustCall(), made assert require and use of successes variable
redundant.
If you amend your commit and push to your test-fs-sync
branch, it will automatically update the Pull Request.
|
||
var file = path.join(common.fixturesDir, 'a.js'); | ||
|
||
fs.open(file, 'a', 0o777, function(err, fd) { | ||
fs.open(file, 'a', 0o777, common.mustCall(function(err, fd) { | ||
if (err) throw err; |
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.
Could you please make this assert.ifError(err)
.
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.
Actually, you could change the other occurrences of if (err) throw err;
as well.
var fs = require('fs'); | ||
var successes = 0; | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
|
||
var file = path.join(common.fixturesDir, 'a.js'); |
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 can be const
as well.
Ping @uttampawar. |
After rebasing against master and resolving conflicts, there are no changes to be made to the file. In other words, someone might have already contributed the same or similar changes independently. I'm going to close this. I'm glad to see your other pull request landed, though! 🎉 |
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
Simplified test by using common.mustCall(). This also made assert module and sucesses variable redundant.
…l(), made assert require and use of successes variable redundant