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

test: improve the code in test-fs-read-stream by edsadr · Pull Request #10556 · nodejs/node · GitHub

/ node Public

test: improve the code in test-fs-read-stream - #10556

Closed
edsadr wants to merge 1 commit into
nodejs:masterfrom
edsadr:fs-read-stream
Closed

test: improve the code in test-fs-read-stream#10556
edsadr wants to merge 1 commit into
nodejs:masterfrom
edsadr:fs-read-stream

Conversation

edsadr commented Dec 31, 2016

Copy link
Copy Markdown
Contributor
  • use const and let instead of var
  • use common.mustCall to control function execution
  • use assert.strictEqual instead of assert.equal
  • use arrow functions
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

nodejs-github-bot added test Issues and PRs related to the tests. lts-watch-v6.x labels Dec 31, 2016
mscdex added the fs Issues and PRs related to the fs subsystem / file system. label Dec 31, 2016
Comment thread test/parallel/test-fs-read-stream-fd.js Outdated

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

I think the common.mustCall() should be removed since there could be more than one 'data' event and we're already verifying the output on process exit anyway.

Comment thread test/parallel/test-fs-read-stream-fd.js Outdated

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

While we're in here editing the file, can you please remove fs.unlinkSync(file);? (There's no need for tests to clean up the temp dir on exit as all tests that use the temp dir should refresh it before using it.)

edsadr commented Jan 2, 2017

Copy link
Copy Markdown
Contributor Author

@mscdex @Trott ... implemented both suggestions...

mscdex commented Jan 2, 2017

Copy link
Copy Markdown
Contributor

LGTM

Trott 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 if CI is ✅

Trott commented Jan 2, 2017

Copy link
Copy Markdown
Member

evanlucas left a comment

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

LGTM. Thanks!

* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions

edsadr commented Jan 3, 2017

Copy link
Copy Markdown
Contributor Author

solved the conflicts after ff1efa6 , please set the CI again

Copy link
Copy Markdown

Copy link
Copy Markdown

Landed 7a46b99

italoacasas closed this Jan 3, 2017
italoacasas pushed a commit that referenced this pull request Jan 3, 2017
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: #10556
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: nodejs#10556
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 19, 2017
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: nodejs#10556
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
targos pushed a commit that referenced this pull request Jan 28, 2017
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: #10556
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
italoacasas mentioned this pull request Jan 29, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: nodejs#10556
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: nodejs#10556
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
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

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


Back | FazBrowse Home | New Git URL