test: fix assert.strictEqual arguments in test/parallel/test-c-ares.js

When using `assert.strictEqual`, the first argument must be the actual
value and the second argument must be the expected value.

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
jungkumseok 2018-10-12 09:13:42 -07:00 committed by Rich Trott
parent 9f7e3a4040
commit 64d65ed7ac

View File

@ -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);
}));
[