test: reverse arguments in assert.strictEqual
assert.strictEqual() had incorrect order of arguments with expected and actual values reversed. PR-URL: https://github.com/nodejs/node/pull/23613 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
parent
fca2173962
commit
99c16900c8
@ -46,7 +46,7 @@ server.listen(0, function() {
|
|||||||
port: this.address().port,
|
port: this.address().port,
|
||||||
agent: agent
|
agent: agent
|
||||||
}, function(res) {
|
}, function(res) {
|
||||||
assert.strictEqual(1, agent.sockets[name].length);
|
assert.strictEqual(agent.sockets[name].length, 1);
|
||||||
res.resume();
|
res.resume();
|
||||||
});
|
});
|
||||||
request.on('socket', function(s) {
|
request.on('socket', function(s) {
|
||||||
@ -63,7 +63,7 @@ server.listen(0, function() {
|
|||||||
port: this.address().port,
|
port: this.address().port,
|
||||||
agent: agent
|
agent: agent
|
||||||
}, function(res) {
|
}, function(res) {
|
||||||
assert.strictEqual(1, agent.sockets[name].length);
|
assert.strictEqual(agent.sockets[name].length, 1);
|
||||||
res.resume();
|
res.resume();
|
||||||
});
|
});
|
||||||
request.on('socket', function(s) {
|
request.on('socket', function(s) {
|
||||||
@ -80,7 +80,7 @@ server.listen(0, function() {
|
|||||||
agent: agent
|
agent: agent
|
||||||
}, function(response) {
|
}, function(response) {
|
||||||
response.on('end', function() {
|
response.on('end', function() {
|
||||||
assert.strictEqual(1, agent.sockets[name].length);
|
assert.strictEqual(agent.sockets[name].length, 1);
|
||||||
server.close();
|
server.close();
|
||||||
});
|
});
|
||||||
response.resume();
|
response.resume();
|
||||||
@ -94,5 +94,5 @@ server.listen(0, function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
process.on('exit', function() {
|
process.on('exit', function() {
|
||||||
assert.strictEqual(3, connectCount);
|
assert.strictEqual(connectCount, 3);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user