summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-server.js
diff options
context:
space:
mode:
authorFabrice Tatieze <fabrice.tatieze@nike.com>2016-12-27 18:18:58 -0800
committerJames M Snell <jasnell@gmail.com>2016-12-29 11:32:28 -0800
commit3d290d2b68a51576a49158e7e6461bb4a9c1ee6b (patch)
tree22455c74e61ee8f32df30ccd859fd1cd53ec2ceb /test/parallel/test-http-server.js
parent4d7531de247339692aced0f9c5643d458e80fc6e (diff)
downloadnode-new-3d290d2b68a51576a49158e7e6461bb4a9c1ee6b.tar.gz
test: use strictEqual in test-http-server
PR-URL: https://github.com/nodejs/node/pull/10478 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-http-server.js')
-rw-r--r--test/parallel/test-http-server.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/parallel/test-http-server.js b/test/parallel/test-http-server.js
index 49283d621c..1870bcc717 100644
--- a/test/parallel/test-http-server.js
+++ b/test/parallel/test-http-server.js
@@ -16,23 +16,23 @@ var server = http.createServer(function(req, res) {
req.id = request_number++;
if (req.id === 0) {
- assert.equal('GET', req.method);
- assert.equal('/hello', url.parse(req.url).pathname);
- assert.equal('world', qs.parse(url.parse(req.url).query).hello);
- assert.equal('b==ar', qs.parse(url.parse(req.url).query).foo);
+ assert.strictEqual('GET', req.method);
+ assert.strictEqual('/hello', url.parse(req.url).pathname);
+ assert.strictEqual('world', qs.parse(url.parse(req.url).query).hello);
+ assert.strictEqual('b==ar', qs.parse(url.parse(req.url).query).foo);
}
if (req.id === 1) {
- assert.equal('POST', req.method);
- assert.equal('/quit', url.parse(req.url).pathname);
+ assert.strictEqual('POST', req.method);
+ assert.strictEqual('/quit', url.parse(req.url).pathname);
}
if (req.id === 2) {
- assert.equal('foo', req.headers['x-x']);
+ assert.strictEqual('foo', req.headers['x-x']);
}
if (req.id === 3) {
- assert.equal('bar', req.headers['x-x']);
+ assert.strictEqual('bar', req.headers['x-x']);
this.close();
}
@@ -75,7 +75,7 @@ server.on('listening', function() {
// you set server.httpAllowHalfOpen=true, which we've done
// above.
c.end();
- assert.equal(c.readyState, 'readOnly');
+ assert.strictEqual(c.readyState, 'readOnly');
requests_sent += 2;
}
@@ -86,19 +86,19 @@ server.on('listening', function() {
});
c.on('close', function() {
- assert.equal(c.readyState, 'closed');
+ assert.strictEqual(c.readyState, 'closed');
});
});
process.on('exit', function() {
- assert.equal(4, request_number);
- assert.equal(4, requests_sent);
+ assert.strictEqual(4, request_number);
+ assert.strictEqual(4, requests_sent);
var hello = new RegExp('/hello');
- assert.equal(true, hello.exec(server_response) != null);
+ assert.notStrictEqual(null, hello.exec(server_response));
var quit = new RegExp('/quit');
- assert.equal(true, quit.exec(server_response) != null);
+ assert.notStrictEqual(null, quit.exec(server_response));
- assert.equal(true, client_got_eof);
+ assert.strictEqual(true, client_got_eof);
});