Skip to content

test: favor === over == in fs-utimes - #9290

Closed
jun-oka wants to merge 2 commits into
nodejs:masterfrom
jun-oka:test-fs-utimes-eqeqeq
Closed

test: favor === over == in fs-utimes#9290
jun-oka wants to merge 2 commits into
nodejs:masterfrom
jun-oka:test-fs-utimes-eqeqeq

Conversation

@jun-oka

Copy link
Copy Markdown
Contributor
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test fs-utimes

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Oct 26, 2016
@cjihrig

Copy link
Copy Markdown
Contributor

This is a good start, but there are other improvements that can be made while you're updating this test:

  • Replace var with const where appropriate.
  • Use common.mustCall() and common.fail() to enforce execution flow.
  • It might be possible to get rid of tests_run, tests_ok, and the process.on('exit', ...), but this would require more digging.

@mscdexmscdex added the fs Issues and PRs related to the fs subsystem / file system. label Oct 26, 2016
@jun-oka

Copy link
Copy Markdown
ContributorAuthor

@cjihrig Sorry, I overlooked var and const one before I commit. Thank you for common.mustCall() and common.fail() info! I will handle it today.

@Trott

Copy link
Copy Markdown
Member

I'd also add that if you do end up keeping the assert.equal(), it would be great if it were possible to use assert.strictEqual() instead.

@jun-oka

Copy link
Copy Markdown
ContributorAuthor

@Trott Understood. I found it on Line 143. Thank you.

@jun-oka

Copy link
Copy Markdown
ContributorAuthor

@cjihrig@Trott I have corrected those issue. Thanks a lot!

@Trott

Copy link
Copy Markdown
Member

@Trott

Trott commented Jan 6, 2017

Copy link
Copy Markdown
Member

@Trott

Trott commented Jan 7, 2017

Copy link
Copy Markdown
Member

Landed in 377ea28.
Thanks for the contribution! 🎉

@TrottTrott closed this Jan 7, 2017
Trott pushed a commit to Trott/io.js that referenced this pull request Jan 7, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: nodejs#9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: nodejs#9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 19, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: nodejs#9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 25, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: nodejs#9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: nodejs#9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@italoacasasitaloacasas mentioned this pull request Jan 29, 2017
MylesBorins pushed a commit that referenced this pull request Mar 8, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: #9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 8, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: #9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: #9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Mar 9, 2017
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: #9290
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Mar 9, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fsIssues and PRs related to the fs subsystem / file system.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@jun-oka@cjihrig@Trott@jasnell@targos@mscdex@MylesBorins@nodejs-github-bot