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

test: improve the code in test-process-hrtime by edsadr · Pull Request #10667 · nodejs/node · GitHub

/ node Public

test: improve the code in test-process-hrtime - #10667

Closed
edsadr wants to merge 1 commit into
nodejs:masterfrom
edsadr:process-hrtime
Closed

test: improve the code in test-process-hrtime#10667
edsadr wants to merge 1 commit into
nodejs:masterfrom
edsadr:process-hrtime

Conversation

edsadr commented Jan 6, 2017

Copy link
Copy Markdown
Contributor
  • use const instead of var
  • use assert.strictEqual instead of assert.equal and plain assert
  • use arrow functions
  • swap assertions arguments to match the standard
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. dont-land-on-v7.x labels Jan 6, 2017
Comment thread test/parallel/test-process-hrtime.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

can you also make this one strictEqual and in the correct order?

mscdex added the process Issues and PRs related to the process subsystem. label Jan 6, 2017

edsadr commented Jan 6, 2017

Copy link
Copy Markdown
Contributor Author

sorry @targos , missed that one... changed it now

Trott commented Jan 8, 2017
edited
Loading

Copy link
Copy Markdown
Member

It would be great if the assert.throws() that only has one argument could be passed a second argument to validate the error. In this case, I think it would be /^TypeError: process.hrtime\(\) only accepts an Array tuple$/.

* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws

edsadr commented Jan 8, 2017

Copy link
Copy Markdown
Contributor Author

Thanks @Trott, just added it as suggested and will have in mind from now on

jasnell pushed a commit that referenced this pull request Jan 10, 2017
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws

PR-URL: #10667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

jasnell commented Jan 10, 2017

Copy link
Copy Markdown
Member

Landed in 2685464

jasnell closed this Jan 10, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws

PR-URL: nodejs#10667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 23, 2017
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws

PR-URL: nodejs#10667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 25, 2017
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws

PR-URL: nodejs#10667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws

PR-URL: nodejs#10667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
italoacasas mentioned this pull request Jan 29, 2017
MylesBorins pushed a commit that referenced this pull request Mar 8, 2017
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws

PR-URL: #10667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

Copy link
Copy Markdown
Contributor

This test fails on v4.x and has not been backported

MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws

PR-URL: #10667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins mentioned this pull request Mar 9, 2017
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

process Issues and PRs related to the process subsystem. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL