Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: favor ’===’ over in ’==’ in http test
  • Loading branch information
jun-oka committed Sep 12, 2016
commit fa4cc2807efb4cee08d6fc381d0904fe0ed814f9
4 changes: 2 additions & 2 deletions test/parallel/test-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var body0 = '';
var body1 = '';

var server = http.Server(function(req, res) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This var and some (but not all) of the others can be changed to const.

if (responses_sent == 0) {
if (responses_sent === 0) {
assert.equal('GET', req.method);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update assert.equal() here and elsewhere to use assert.strictEqual() instead? Might as well get all our minor refactoring in at once. :-D

assert.equal('/hello', url.parse(req.url).pathname);

Expand All @@ -22,7 +22,7 @@ var server = http.Server(function(req, res) {
assert.equal('bar', req.headers['foo']);
}

if (responses_sent == 1) {
if (responses_sent === 1) {
assert.equal('POST', req.method);
assert.equal('/world', url.parse(req.url).pathname);
this.close();
Expand Down