Skip to content

Commit

Permalink
test: fix strictEqual argument order
Browse files Browse the repository at this point in the history
PR-URL: #23490
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
fastereder authored and jasnell committed Oct 17, 2018
1 parent 3fc8c7a commit 945f9d7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/parallel/test-http-status-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,22 @@ const s = http.createServer(function(req, res) {

s.listen(0, test);


function test() {
const bufs = [];
const client = net.connect(this.address().port, function() {
client.write('GET / HTTP/1.1\r\nConnection: close\r\n\r\n');
});
const client = net.connect(
this.address().port,
function() {
client.write('GET / HTTP/1.1\r\nConnection: close\r\n\r\n');
}
);
client.on('data', function(chunk) {
bufs.push(chunk);
});
client.on('end', function() {
const head = Buffer.concat(bufs).toString('latin1').split('\r\n')[0];
assert.strictEqual('HTTP/1.1 200 Custom Message', head);
const head = Buffer.concat(bufs)
.toString('latin1')
.split('\r\n')[0];
assert.strictEqual(head, 'HTTP/1.1 200 Custom Message');
console.log('ok');
s.close();
});
Expand Down

0 comments on commit 945f9d7

Please sign in to comment.