FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: refactor fs.write() test by PatrickHeneise · Pull Request #16827 · nodejs/node · GitHub

/ node Public

test: refactor fs.write() test - #16827

Closed
PatrickHeneise wants to merge 4 commits into
nodejs:masterfrom
PatrickHeneise:cov-fs-cleanup
Closed

test: refactor fs.write() test#16827
PatrickHeneise wants to merge 4 commits into
nodejs:masterfrom
PatrickHeneise:cov-fs-cleanup

Conversation

Copy link
Copy Markdown

Refactored fs.write() tests to use done, thanks for your help @mcollina.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

nodejs-github-bot added the test Issues and PRs related to the tests. label Nov 6, 2017
mscdex added the fs Issues and PRs related to the fs subsystem / file system. label Nov 6, 2017
Comment thread test/parallel/test-fs-write.js Outdated
}));
});

fs.write(fd, '', 0, 'utf8', function(err, written) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There probably needs to be a common.mustCall() for this callback as well.

PatrickHeneise Nov 6, 2017
edited
Loading

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Like this:

  const written = common.mustCall(function(err, written) {
    assert.strictEqual(0, written);
  });

  fs.write(fd, '', 0, 'utf8', written);

?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Either inline or not, doesn't really matter.

Comment thread test/parallel/test-fs-write.js Outdated
assert.strictEqual(expected, found);
});

fs.write(fd, '', 0, 'utf8', (err, written) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ditto.

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

mcollina added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 7, 2017

mcollina commented Nov 7, 2017

Copy link
Copy Markdown
Member

Trott commented Nov 8, 2017

Copy link
Copy Markdown
Member

AIX failure is unrelated (and now fixed if you want to do a re-run but I don't think that's necessary).

Copy link
Copy Markdown
Member

gireeshpunathil pushed a commit that referenced this pull request Nov 13, 2017
PR-URL: #16827
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

Copy link
Copy Markdown
Member

Landed in 8215c67 , thanks!

evanlucas pushed a commit that referenced this pull request Nov 13, 2017
PR-URL: #16827
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
evanlucas mentioned this pull request Nov 13, 2017
MylesBorins pushed a commit that referenced this pull request Nov 17, 2017
PR-URL: #16827
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
addaleax pushed a commit that referenced this pull request Nov 18, 2017
Easier way to resolve conflicts from #16822 and #16827.

PR-URL: #17045
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
gibfahn mentioned this pull request Nov 21, 2017
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
Easier way to resolve conflicts from #16822 and #16827.

PR-URL: #17045
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
gibfahn pushed a commit that referenced this pull request Dec 19, 2017
Easier way to resolve conflicts from #16822 and #16827.

PR-URL: #17045
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
Easier way to resolve conflicts from #16822 and #16827.

PR-URL: #17045
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

8 participants


Back | FazBrowse Home | New Git URL