test: s/assert.equal/assert.strictEqual/

Use assert.strictEqual instead of assert.equal in tests, manually
convert types where necessary.

PR-URL: https://github.com/nodejs/node/pull/10698
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
This commit is contained in:
Gibson Fahnestock 2017-01-08 15:36:25 +00:00
parent 81fef918d5
commit 3d2aef3979
331 changed files with 1704 additions and 1665 deletions

View file

@ -51,7 +51,7 @@ function mustCall(f, times) {
process.setMaxListeners(256);
process.on('exit', function() {
assert.equal(actual, times || 1);
assert.strictEqual(actual, times || 1);
});
return function() {
@ -64,7 +64,7 @@ function mustCall(f, times) {
function expectBody(expected) {
return mustCall(function(buf, start, len) {
const body = '' + buf.slice(start, start + len);
assert.equal(body, expected);
assert.strictEqual(body, expected);
});
}
@ -535,10 +535,10 @@ function expectBody(expected) {
const onHeadersComplete1 = function(versionMajor, versionMinor, headers,
method, url, statusCode, statusMessage,
upgrade, shouldKeepAlive) {
assert.equal(method, methods.indexOf('PUT'));
assert.equal(url, '/this');
assert.equal(versionMajor, 1);
assert.equal(versionMinor, 1);
assert.strictEqual(method, methods.indexOf('PUT'));
assert.strictEqual(url, '/this');
assert.strictEqual(versionMajor, 1);
assert.strictEqual(versionMinor, 1);
assert.deepStrictEqual(
headers,
['Content-Type', 'text/plain', 'Transfer-Encoding', 'chunked']);