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

@ -14,7 +14,7 @@ const s = http.createServer(function(req, res) {
const t = tests[testIdx];
res.writeHead(t, {'Content-Type': 'text/plain'});
console.log('--\nserver: statusCode after writeHead: ' + res.statusCode);
assert.equal(res.statusCode, t);
assert.strictEqual(res.statusCode, t);
res.end('hello world\n');
});
@ -30,7 +30,7 @@ function nextTest() {
http.get({ port: s.address().port }, function(response) {
console.log('client: expected status: ' + test);
console.log('client: statusCode: ' + response.statusCode);
assert.equal(response.statusCode, test);
assert.strictEqual(response.statusCode, test);
response.on('end', function() {
testsComplete++;
testIdx += 1;
@ -42,5 +42,5 @@ function nextTest() {
process.on('exit', function() {
assert.equal(5, testsComplete);
assert.strictEqual(5, testsComplete);
});