Skip to content

Commit ed84b7d

Browse files
CoreyGMartintargos
authored andcommitted
test: changed assert message from string literal to template literal
PR-URL: #20870 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent be2a467 commit ed84b7d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/parallel/test-http-set-trailers.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ server.on('listening', function() {
5454

5555
c.on('end', function() {
5656
c.end();
57-
assert.ok(!/x-foo/.test(res_buffer), 'Trailer in HTTP/1.0 response.');
57+
assert.ok(
58+
!/x-foo/.test(res_buffer),
59+
`Trailer in HTTP/1.0 response. Response buffer: ${res_buffer}`
60+
);
5861
outstanding_reqs--;
5962
if (outstanding_reqs === 0) {
6063
server.close();
@@ -84,7 +87,7 @@ server.on('listening', function() {
8487
clearTimeout(tid);
8588
assert.ok(
8689
/0\r\nx-foo: bar\r\n\r\n$/.test(res_buffer),
87-
'No trailer in HTTP/1.1 response.'
90+
`No trailer in HTTP/1.1 response. Response buffer: ${res_buffer}`
8891
);
8992
if (outstanding_reqs === 0) {
9093
server.close();

0 commit comments

Comments
 (0)