-
Notifications
You must be signed in to change notification settings - Fork 30k
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: replace assert.equal with assert.strictEqual #9842
Conversation
LGTM if CI passes. Nit: Can you update the first line of the commit message to comply with https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#step-3-commit? The first line should probably be something like: |
94b3a81
to
46b1704
Compare
Amended the commit message. Thanks! |
CI is green. I approved the PR in the GitHub interface. With a tiny number of exceptions, we leave PRs open for at least 48 hours (72 hours on weekends) to make sure people have an opportunity to comment etc. So if nobody expresses any objections, this can land Thursday afternoon Austin time. |
Awesome! Thanks for the introduction and guidance at NodeInteractive / NodeTodo. 👍 |
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, very good to see CI completely green
@@ -4,7 +4,7 @@ var assert = require('assert'); | |||
const binding = require(`./build/${common.buildType}/binding`); | |||
|
|||
binding(5, common.mustCall(function(err, val) { | |||
assert.equal(null, err); | |||
assert.equal(10, val); | |||
assert.strictEqual(null, err); |
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.
Nit: can you please swap the arguments? the first one is actual
and the second one expected
.
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.
Yeah, sure thing.
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.
@lpinca Swapped this instance and a couple others that were in expected, actual order instead of the desired actual, expected signature. Then rebased and squashed changes into one commit.
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.
@brad-decker perfect, thanks!
Using NodeTodo I learned of a need to swap out the .equal function with .strictEqual in a few test files. https://twitter.com/NodeTodo/status/803657321993961472 https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c additional commits squashed: .strictEqual's argument signature is actual, expected, [message]. Previously some statements were listed as expected, actual. As asked in PR i swapped them to match the correct argument signature.
46b1704
to
530a0c3
Compare
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
Landed in 18016d3 🎉 |
Using NodeTodo I learned of a need to swap out the .equal function with .strictEqual in a few test files. https://twitter.com/NodeTodo/status/803657321993961472 https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c additional commits squashed: .strictEqual's argument signature is actual, expected, [message]. Previously some statements were listed as expected, actual. As asked in PR i swapped them to match the correct argument signature. PR-URL: #9842 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Using NodeTodo I learned of a need to swap out the .equal function with .strictEqual in a few test files. https://twitter.com/NodeTodo/status/803657321993961472 https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c additional commits squashed: .strictEqual's argument signature is actual, expected, [message]. Previously some statements were listed as expected, actual. As asked in PR i swapped them to match the correct argument signature. PR-URL: #9842 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Using NodeTodo I learned of a need to swap out the .equal function with .strictEqual in a few test files. https://twitter.com/NodeTodo/status/803657321993961472 https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c additional commits squashed: .strictEqual's argument signature is actual, expected, [message]. Previously some statements were listed as expected, actual. As asked in PR i swapped them to match the correct argument signature. PR-URL: nodejs#9842 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Using NodeTodo I learned of a need to swap out the .equal function with .strictEqual in a few test files. https://twitter.com/NodeTodo/status/803657321993961472 https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c additional commits squashed: .strictEqual's argument signature is actual, expected, [message]. Previously some statements were listed as expected, actual. As asked in PR i swapped them to match the correct argument signature. PR-URL: nodejs#9842 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Using NodeTodo I learned of a need to swap out the .equal function with .strictEqual in a few test files. https://twitter.com/NodeTodo/status/803657321993961472 https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c additional commits squashed: .strictEqual's argument signature is actual, expected, [message]. Previously some statements were listed as expected, actual. As asked in PR i swapped them to match the correct argument signature. PR-URL: #9842 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
Using NodeTodo I learned of a need to swap out the .equal function
with .strictEqual in a few test files.
https://twitter.com/NodeTodo/status/803657321993961472
https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c
This pull request simply applies those suggested fixes.