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 <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Axxxx0n authored and trivikr committed Mar 31, 2018
1 parent a2ffdc9 commit 28b622c
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,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 28b622c

Please sign in to comment.