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 <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>
  • 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.