Skip to content

Commit 1fab8b4

Browse files
isurusirijasnell
authored andcommitted
test: remove message from strictEqual assertions
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>
1 parent f2396ee commit 1fab8b4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/parallel/test-http-response-readable.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ const testServer = new http.Server(function(req, res) {
3131

3232
testServer.listen(0, function() {
3333
http.get({ port: this.address().port }, function(res) {
34-
assert.strictEqual(res.readable, true, 'res.readable initially true');
34+
assert.strictEqual(res.readable, true);
3535
res.on('end', function() {
36-
assert.strictEqual(res.readable, false,
37-
'res.readable set to false after end');
36+
assert.strictEqual(res.readable, false);
3837
testServer.close();
3938
});
4039
res.resume();

0 commit comments

Comments
 (0)