Skip to content

Commit

Permalink
test: fix assert.strictEqual arguments in test/parallel/test-c-ares.js
Browse files Browse the repository at this point in the history
When using `assert.strictEqual`, the first argument must be the actual
value and the second argument must be the expected value.

PR-URL: #23448
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
jungkumseok authored and MylesBorins committed Oct 30, 2018
1 parent a354091 commit 31a9660
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-c-ares.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ const dnsPromises = dns.promises;

dns.lookup(null, common.mustCall((error, result, addressType) => {
assert.ifError(error);
assert.strictEqual(null, result);
assert.strictEqual(4, addressType);
assert.strictEqual(result, null);
assert.strictEqual(addressType, 4);
}));

dns.lookup('127.0.0.1', common.mustCall((error, result, addressType) => {
assert.ifError(error);
assert.strictEqual('127.0.0.1', result);
assert.strictEqual(4, addressType);
assert.strictEqual(result, '127.0.0.1');
assert.strictEqual(addressType, 4);
}));

dns.lookup('::1', common.mustCall((error, result, addressType) => {
assert.ifError(error);
assert.strictEqual('::1', result);
assert.strictEqual(6, addressType);
assert.strictEqual(result, '::1');
assert.strictEqual(addressType, 6);
}));

[
Expand Down

0 comments on commit 31a9660

Please sign in to comment.