-
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: cleanup test-c-ares.js #8577
Conversation
Hey @sejoker I read your file changes and was wondering why did you wrapped callbacks into |
@MichaelTSS according to best practices from |
LGTM with a comment. |
@@ -36,8 +36,8 @@ assert.throws(function() { | |||
// C:\Windows\System32\drivers\etc\hosts | |||
// so we disable this test on Windows. | |||
if (!common.isWindows) { | |||
dns.reverse('127.0.0.1', function(error, domains) { | |||
dns.reverse('127.0.0.1', common.mustCall(function(error, domains) { | |||
if (error) throw error; |
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.
Could you change this line to assert.ifError(error);
.
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.
@cjihrig updated PR according to feedback.
replace equal with strictEqual, use const instead of var replace throw error with assert.ifError
1258850
to
012e80a
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
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
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'll start the process of landing this. Will amend the commit title to: |
Replace equal with strictEqual, use const instead of var Replace throw error with assert.ifError PR-URL: #8577 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Replace equal with strictEqual, use const instead of var Replace throw error with assert.ifError PR-URL: #8577 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Cleanup according to nodejs/code-and-learn#56
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change