Skip to content
Permalink
Browse files

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>
  • Loading branch information...
CoreyGMartin authored and jasnell committed May 21, 2018
1 parent 5823938 commit 6e8abb13aa0be3a2ed18d7958c85465ac0b3c92b
Showing with 5 additions and 2 deletions.
  1. +5 −2 test/parallel/test-http-set-trailers.js
@@ -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();
@@ -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();

0 comments on commit 6e8abb1

Please sign in to comment.
You can’t perform that action at this time.