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 targos committed Apr 2, 2018
1 parent c8fa8f1 commit ff7f28c
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 @@ -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 ff7f28c

Please sign in to comment.