Skip to content

Commit

Permalink
test: remove message from strictEqual assertions
Browse files Browse the repository at this point in the history
If values are not equals in strictEqual assertions, an AssertionError is
thrown with a message property set equals to the value of the message
parameter. If we pass a message, this message will be printed instead of
the default message, which contains the value that is causing the error.
Hence removed the value passed as the message in strictEqual assertions
of test/parallel/test-http-response-readable.js

PR-URL: #20067
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
isurusiri authored and jasnell committed Apr 19, 2018
1 parent f2396ee commit 1fab8b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/parallel/test-http-response-readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ const testServer = new http.Server(function(req, res) {

testServer.listen(0, function() {
http.get({ port: this.address().port }, function(res) {
assert.strictEqual(res.readable, true, 'res.readable initially true');
assert.strictEqual(res.readable, true);
res.on('end', function() {
assert.strictEqual(res.readable, false,
'res.readable set to false after end');
assert.strictEqual(res.readable, false);
testServer.close();
});
res.resume();
Expand Down

0 comments on commit 1fab8b4

Please sign in to comment.