Skip to content

Conversation

uttampawar
Copy link
Contributor

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected 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

…l(), made assert require and use of successes variable redundant
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@imyller imyller added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. fs Issues and PRs related to the fs subsystem / file system. labels Dec 1, 2016
Copy link
Member

@gibfahn gibfahn left a 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.


fs.open(file, 'a', 0o777, function(err, fd) {
fs.open(file, 'a', 0o777, common.mustCall(function(err, fd) {
if (err) throw err;
Copy link
Contributor

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).

Copy link
Contributor

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.

const path = require('path');
const fs = require('fs');

var file = path.join(common.fixturesDir, 'a.js');
Copy link
Contributor

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.

@lpinca
Copy link
Member

lpinca commented Dec 16, 2016

Ping @uttampawar.

@Trott
Copy link
Member

Trott commented Dec 22, 2016

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! 🎉

@Trott Trott closed this Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. fs Issues and PRs related to the fs subsystem / file system. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants