Permalink
Browse files

test: remove 3rd argument from assert.strictEqual

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 trivikr committed Mar 30, 2018
1 parent a2ffdc9 commit 28b622cb08602d77512fa3d659451cd317dfcc41
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/parallel/test-http-res-write-after-end.js
@@ -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() {

0 comments on commit 28b622c

Please sign in to comment.