-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: clean up test-child-process-exec-cwd.js
#9231
Conversation
cc @Trott |
@@ -15,5 +15,5 @@ if (common.isWindows) { | |||
|
|||
exec(pwdcommand, {cwd: dir}, common.mustCall(function(err, stdout, stderr) { | |||
assert.ifError(err); | |||
assert.ok(stdout.indexOf(dir) == 0); | |||
assert.ok(stdout.indexOf(dir) === 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would probably make more sense as assert.strictEqual(stdout.indexOf(dir), 0);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I like @cjihrig's suggestion.
Nit: |
3f36973
to
41e483b
Compare
Review comments, including editing commit message, addressed. Thanks everyone! |
- Changed `assert.ok()` to `assert.strictEqual()`. - Changed `var` to `const` where possible.
41e483b
to
381a524
Compare
test-child-process-exec-cwd.js
test-child-process-exec-cwd.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
too much red in that last CI run.. trying again: https://ci.nodejs.org/job/node-test-pull-request/4667/ |
- Changed `assert.ok()` to `assert.strictEqual()`. - Changed `var` to `const` where possible. PR-URL: nodejs#9231 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Landed in 2d472a3 |
- Changed `assert.ok()` to `assert.strictEqual()`. - Changed `var` to `const` where possible. PR-URL: #9231 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
- Changed `assert.ok()` to `assert.strictEqual()`. - Changed `var` to `const` where possible. PR-URL: #9231 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
- Changed `assert.ok()` to `assert.strictEqual()`. - Changed `var` to `const` where possible. PR-URL: #9231 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
- Changed `assert.ok()` to `assert.strictEqual()`. - Changed `var` to `const` where possible. PR-URL: #9231 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
This patch provides minor fixes to
test-child-process-exec-cwd.js
. Notably:==
to===
.var
toconst
where possible.