Skip to content

Commit b74bc51

Browse files
ftatiezeMylesBorins
authored andcommitted
test: use strictEqual in test-http-server
PR-URL: #10478 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 78010aa commit b74bc51

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

test/parallel/test-http-server.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ var server = http.createServer(function(req, res) {
1616
req.id = request_number++;
1717

1818
if (req.id === 0) {
19-
assert.equal('GET', req.method);
20-
assert.equal('/hello', url.parse(req.url).pathname);
21-
assert.equal('world', qs.parse(url.parse(req.url).query).hello);
22-
assert.equal('b==ar', qs.parse(url.parse(req.url).query).foo);
19+
assert.strictEqual('GET', req.method);
20+
assert.strictEqual('/hello', url.parse(req.url).pathname);
21+
assert.strictEqual('world', qs.parse(url.parse(req.url).query).hello);
22+
assert.strictEqual('b==ar', qs.parse(url.parse(req.url).query).foo);
2323
}
2424

2525
if (req.id === 1) {
26-
assert.equal('POST', req.method);
27-
assert.equal('/quit', url.parse(req.url).pathname);
26+
assert.strictEqual('POST', req.method);
27+
assert.strictEqual('/quit', url.parse(req.url).pathname);
2828
}
2929

3030
if (req.id === 2) {
31-
assert.equal('foo', req.headers['x-x']);
31+
assert.strictEqual('foo', req.headers['x-x']);
3232
}
3333

3434
if (req.id === 3) {
35-
assert.equal('bar', req.headers['x-x']);
35+
assert.strictEqual('bar', req.headers['x-x']);
3636
this.close();
3737
}
3838

@@ -75,7 +75,7 @@ server.on('listening', function() {
7575
// you set server.httpAllowHalfOpen=true, which we've done
7676
// above.
7777
c.end();
78-
assert.equal(c.readyState, 'readOnly');
78+
assert.strictEqual(c.readyState, 'readOnly');
7979
requests_sent += 2;
8080
}
8181

@@ -86,19 +86,19 @@ server.on('listening', function() {
8686
});
8787

8888
c.on('close', function() {
89-
assert.equal(c.readyState, 'closed');
89+
assert.strictEqual(c.readyState, 'closed');
9090
});
9191
});
9292

9393
process.on('exit', function() {
94-
assert.equal(4, request_number);
95-
assert.equal(4, requests_sent);
94+
assert.strictEqual(4, request_number);
95+
assert.strictEqual(4, requests_sent);
9696

9797
var hello = new RegExp('/hello');
98-
assert.equal(true, hello.exec(server_response) != null);
98+
assert.notStrictEqual(null, hello.exec(server_response));
9999

100100
var quit = new RegExp('/quit');
101-
assert.equal(true, quit.exec(server_response) != null);
101+
assert.notStrictEqual(null, quit.exec(server_response));
102102

103-
assert.equal(true, client_got_eof);
103+
assert.strictEqual(true, client_got_eof);
104104
});

0 commit comments

Comments
 (0)