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: replace assert.equal with assert.strictEqual #9842

Closed
wants to merge 1 commit into from

Conversation

brad-decker
Copy link
Contributor

@brad-decker brad-decker commented Nov 29, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected 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.

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Nov 29, 2016
@brad-decker brad-decker changed the title replaces assert.equal with asser.strictEqual in some tests test: replaces assert.equal with asser.strictEqual Nov 29, 2016
@Trott
Copy link
Member

Trott commented Nov 29, 2016

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: test: replace assert.equal with assert.strictEqual

@Trott
Copy link
Member

Trott commented Nov 29, 2016

@brad-decker
Copy link
Contributor Author

Amended the commit message. Thanks!

@brad-decker brad-decker changed the title test: replaces assert.equal with asser.strictEqual test: replace assert.equal with assert.strictEqual Nov 29, 2016
@mscdex mscdex added the addons Issues and PRs related to native addons. label Nov 29, 2016
@Trott
Copy link
Member

Trott commented Nov 29, 2016

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.

@brad-decker
Copy link
Contributor Author

Awesome! Thanks for the introduction and guidance at NodeInteractive / NodeTodo. 👍

Copy link
Member

@gibfahn gibfahn left a 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);
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sure thing.

Copy link
Contributor Author

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.

Copy link
Member

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.
@lpinca
Copy link
Member

lpinca commented Nov 30, 2016

New CI: https://ci.nodejs.org/job/node-test-pull-request/5033/

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Trott
Copy link
Member

Trott commented Dec 1, 2016

Landed in 18016d3 🎉

@Trott Trott closed this Dec 1, 2016
Trott pushed a commit that referenced this pull request Dec 1, 2016
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>
addaleax pushed a commit that referenced this pull request Dec 5, 2016
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>
@Fishrock123 Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
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>
jmdarling pushed a commit to jmdarling/node that referenced this pull request Dec 8, 2016
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>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addons Issues and PRs related to native addons. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.