diff options
Diffstat (limited to 'test/parallel/test-http-invalidheaderfield2.js')
-rw-r--r-- | test/parallel/test-http-invalidheaderfield2.js | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/test/parallel/test-http-invalidheaderfield2.js b/test/parallel/test-http-invalidheaderfield2.js index e7e8013c37..2267c8565c 100644 --- a/test/parallel/test-http-invalidheaderfield2.js +++ b/test/parallel/test-http-invalidheaderfield2.js @@ -28,11 +28,9 @@ const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; '4+2', '3.14159265359' ].forEach(function(str) { - assert.strictEqual(checkIsHttpToken(str), - true, - 'checkIsHttpToken(' + - inspect(str) + - ') unexpectedly failed'); + assert.strictEqual( + checkIsHttpToken(str), true, + `checkIsHttpToken(${inspect(str)}) unexpectedly failed`); }); // Bad header field names [ @@ -56,11 +54,9 @@ const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; '"Quote"', 'This,That' ].forEach(function(str) { - assert.strictEqual(checkIsHttpToken(str), - false, - 'checkIsHttpToken(' + - inspect(str) + - ') unexpectedly succeeded'); + assert.strictEqual( + checkIsHttpToken(str), false, + `checkIsHttpToken(${inspect(str)}) unexpectedly succeeded`); }); @@ -71,11 +67,9 @@ const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; '0123456789ABCdef', '!@#$%^&*()-_=+\\;\':"[]{}<>,./?|~`' ].forEach(function(str) { - assert.strictEqual(checkInvalidHeaderChar(str), - false, - 'checkInvalidHeaderChar(' + - inspect(str) + - ') unexpectedly failed'); + assert.strictEqual( + checkInvalidHeaderChar(str), false, + `checkInvalidHeaderChar(${inspect(str)}) unexpectedly failed`); }); // Bad header field values @@ -89,9 +83,7 @@ const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; 'foo\vbar', 'Ding!\x07' ].forEach(function(str) { - assert.strictEqual(checkInvalidHeaderChar(str), - true, - 'checkInvalidHeaderChar(' + - inspect(str) + - ') unexpectedly succeeded'); + assert.strictEqual( + checkInvalidHeaderChar(str), true, + `checkInvalidHeaderChar(${inspect(str)}) unexpectedly succeeded`); }); |