Skip to content

Commit

Permalink
test: remove 3rd argument from assert.strictEqual
Browse files Browse the repository at this point in the history
If there is an AssertionError, the string literal is printed and not the
value of `r`. For debugging purposes, it is good to know if `r` is false
or null or something else.

PR-URL: #19707
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Axxxx0n authored and BethGriggs committed Dec 4, 2018
1 parent 3ca10fa commit bd9cc92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-http-res-write-after-end.js
Expand Up @@ -33,7 +33,8 @@ const server = http.Server(common.mustCall(function(req, res) {
res.end();

const r = res.write('This should raise an error.');
assert.strictEqual(r, true, 'write after end should return true');
// write after end should return true
assert.strictEqual(r, true);
}));

server.listen(0, function() {
Expand Down

0 comments on commit bd9cc92

Please sign in to comment.