diff options
author | Felix Schlenkrich <felix.schlenkrich@gmail.com> | 2018-10-12 09:33:41 -0700 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-10-15 12:00:00 +0200 |
commit | fd289959c8307e33da043cad3fc6b72aac802e82 (patch) | |
tree | d883a5fcc3b898677231f0d1050d486a945ff55a /test/parallel/test-http-status-message.js | |
parent | 61f5543e5ba202437ff9913e8141a0509cab14de (diff) | |
download | android-node-v8-fd289959c8307e33da043cad3fc6b72aac802e82.tar.gz android-node-v8-fd289959c8307e33da043cad3fc6b72aac802e82.tar.bz2 android-node-v8-fd289959c8307e33da043cad3fc6b72aac802e82.zip |
test: fix strictEqual argument order
PR-URL: https://github.com/nodejs/node/pull/23490
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'test/parallel/test-http-status-message.js')
-rw-r--r-- | test/parallel/test-http-status-message.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/parallel/test-http-status-message.js b/test/parallel/test-http-status-message.js index 10d1729581..29b31a35a5 100644 --- a/test/parallel/test-http-status-message.js +++ b/test/parallel/test-http-status-message.js @@ -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(); }); |