Skip to content

Commit ff7f28c

Browse files
Axxxx0ntargos
authored andcommitted
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 <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent c8fa8f1 commit ff7f28c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-http-res-write-after-end.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ const server = http.Server(common.mustCall(function(req, res) {
3333
res.end();
3434

3535
const r = res.write('This should raise an error.');
36-
assert.strictEqual(r, true, 'write after end should return true');
36+
// write after end should return true
37+
assert.strictEqual(r, true);
3738
}));
3839

3940
server.listen(0, function() {

0 commit comments

Comments
 (0)