Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

jun-oka
Copy link
Contributor

@jun-oka jun-oka commented Oct 26, 2016

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-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 26, 2016
@cjihrig
Copy link
Contributor

cjihrig commented Oct 26, 2016

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.

@mscdex mscdex added the fs Issues and PRs related to the fs subsystem / file system. label Oct 26, 2016
@jun-oka
Copy link
Contributor Author

jun-oka commented Oct 26, 2016

@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
Member

Trott commented Oct 26, 2016

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
Contributor Author

jun-oka commented Oct 26, 2016

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

@jun-oka
Copy link
Contributor Author

jun-oka commented Dec 24, 2016

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

@Trott
Copy link
Member

Trott commented Dec 24, 2016

@Trott
Copy link
Member

Trott commented Jan 6, 2017

@Trott
Copy link
Member

Trott commented Jan 7, 2017

Landed in 377ea28.
Thanks for the contribution! 🎉

@Trott Trott 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>
@italoacasas italoacasas 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>
@MylesBorins MylesBorins 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>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
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.

None yet

8 participants