Skip to content

Commit

Permalink
test: changed assert message from string literal to template literal
Browse files Browse the repository at this point in the history
PR-URL: #20870
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
CoreyGMartin authored and targos committed May 25, 2018
1 parent be2a467 commit ed84b7d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/parallel/test-http-set-trailers.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ server.on('listening', function() {

c.on('end', function() {
c.end();
assert.ok(!/x-foo/.test(res_buffer), 'Trailer in HTTP/1.0 response.');
assert.ok(
!/x-foo/.test(res_buffer),
`Trailer in HTTP/1.0 response. Response buffer: ${res_buffer}`
);
outstanding_reqs--;
if (outstanding_reqs === 0) {
server.close();
Expand Down Expand Up @@ -84,7 +87,7 @@ server.on('listening', function() {
clearTimeout(tid);
assert.ok(
/0\r\nx-foo: bar\r\n\r\n$/.test(res_buffer),
'No trailer in HTTP/1.1 response.'
`No trailer in HTTP/1.1 response. Response buffer: ${res_buffer}`
);
if (outstanding_reqs === 0) {
server.close();
Expand Down

0 comments on commit ed84b7d

Please sign in to comment.