summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-connect-req-res.js
diff options
context:
space:
mode:
authorGibson Fahnestock <gib@uk.ibm.com>2017-01-08 15:36:25 +0000
committerGibson Fahnestock <gib@uk.ibm.com>2017-01-11 14:19:26 +0000
commit3d2aef3979cf7ac986908dbb9879216caec4a3ff (patch)
tree0566cf3150e4b9bcce3359814b3927c562bdbc42 /test/parallel/test-http-connect-req-res.js
parent81fef918d5a8a9aa297b78ade5e58d6caa3176e6 (diff)
downloadandroid-node-v8-3d2aef3979cf7ac986908dbb9879216caec4a3ff.tar.gz
android-node-v8-3d2aef3979cf7ac986908dbb9879216caec4a3ff.tar.bz2
android-node-v8-3d2aef3979cf7ac986908dbb9879216caec4a3ff.zip
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>
Diffstat (limited to 'test/parallel/test-http-connect-req-res.js')
-rw-r--r--test/parallel/test-http-connect-req-res.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-http-connect-req-res.js b/test/parallel/test-http-connect-req-res.js
index 0b1ca4630a..45881f0d7d 100644
--- a/test/parallel/test-http-connect-req-res.js
+++ b/test/parallel/test-http-connect-req-res.js
@@ -5,8 +5,8 @@ const http = require('http');
const server = http.createServer(common.fail);
server.on('connect', common.mustCall(function(req, socket, firstBodyChunk) {
- assert.equal(req.method, 'CONNECT');
- assert.equal(req.url, 'example.com:443');
+ assert.strictEqual(req.method, 'CONNECT');
+ assert.strictEqual(req.url, 'example.com:443');
console.error('Server got CONNECT request');
// It is legal for the server to send some data intended for the client
@@ -46,19 +46,19 @@ server.listen(0, common.mustCall(function() {
// Make sure this socket has detached.
assert(!socket.ondata);
assert(!socket.onend);
- assert.equal(socket.listeners('connect').length, 0);
- assert.equal(socket.listeners('data').length, 0);
+ assert.strictEqual(socket.listeners('connect').length, 0);
+ assert.strictEqual(socket.listeners('data').length, 0);
let data = firstBodyChunk.toString();
// test that the firstBodyChunk was not parsed as HTTP
- assert.equal(data, 'Head');
+ assert.strictEqual(data, 'Head');
socket.on('data', function(buf) {
data += buf.toString();
});
socket.on('end', function() {
- assert.equal(data, 'HeadRequestEnd');
+ assert.strictEqual(data, 'HeadRequestEnd');
server.close();
});
socket.end('End');