mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
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:
parent
81fef918d5
commit
3d2aef3979
331 changed files with 1704 additions and 1665 deletions
|
@ -9,7 +9,7 @@ let serverSocket = null;
|
|||
const server = http.createServer(function(req, res) {
|
||||
// They should all come in on the same server socket.
|
||||
if (serverSocket) {
|
||||
assert.equal(req.socket, serverSocket);
|
||||
assert.strictEqual(req.socket, serverSocket);
|
||||
} else {
|
||||
serverSocket = req.socket;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ function makeRequest(n) {
|
|||
|
||||
req.on('socket', function(sock) {
|
||||
if (clientSocket) {
|
||||
assert.equal(sock, clientSocket);
|
||||
assert.strictEqual(sock, clientSocket);
|
||||
} else {
|
||||
clientSocket = sock;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ function makeRequest(n) {
|
|||
data += c;
|
||||
});
|
||||
res.on('end', function() {
|
||||
assert.equal(data, '/' + n);
|
||||
assert.strictEqual(data, '/' + n);
|
||||
setTimeout(function() {
|
||||
actualRequests++;
|
||||
makeRequest(n - 1);
|
||||
|
@ -68,6 +68,6 @@ function makeRequest(n) {
|
|||
}
|
||||
|
||||
process.on('exit', function() {
|
||||
assert.equal(actualRequests, expectRequests);
|
||||
assert.strictEqual(actualRequests, expectRequests);
|
||||
console.log('ok');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue