diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-07-15 03:30:28 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-07-21 20:40:52 +0300 |
commit | 4f875222445b07016a8294fa5a5bf7418c735489 (patch) | |
tree | fcb4996be68507c06dec905eacff6300d74319e7 /test/parallel/test-http-invalidheaderfield2.js | |
parent | 43bd47c352a368db6051b1017225abace015d3c9 (diff) | |
download | android-node-v8-4f875222445b07016a8294fa5a5bf7418c735489.tar.gz android-node-v8-4f875222445b07016a8294fa5a5bf7418c735489.tar.bz2 android-node-v8-4f875222445b07016a8294fa5a5bf7418c735489.zip |
doc, lib, test: do not re-require needlessly
PR-URL: https://github.com/nodejs/node/pull/14244
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Diffstat (limited to 'test/parallel/test-http-invalidheaderfield2.js')
-rw-r--r-- | test/parallel/test-http-invalidheaderfield2.js | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/test/parallel/test-http-invalidheaderfield2.js b/test/parallel/test-http-invalidheaderfield2.js index 2267c8565c..40415d9c36 100644 --- a/test/parallel/test-http-invalidheaderfield2.js +++ b/test/parallel/test-http-invalidheaderfield2.js @@ -2,8 +2,7 @@ require('../common'); const assert = require('assert'); const inspect = require('util').inspect; -const checkIsHttpToken = require('_http_common')._checkIsHttpToken; -const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; +const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common'); // Good header field names [ @@ -29,8 +28,8 @@ const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; '3.14159265359' ].forEach(function(str) { assert.strictEqual( - checkIsHttpToken(str), true, - `checkIsHttpToken(${inspect(str)}) unexpectedly failed`); + _checkIsHttpToken(str), true, + `_checkIsHttpToken(${inspect(str)}) unexpectedly failed`); }); // Bad header field names [ @@ -55,8 +54,8 @@ const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; 'This,That' ].forEach(function(str) { assert.strictEqual( - checkIsHttpToken(str), false, - `checkIsHttpToken(${inspect(str)}) unexpectedly succeeded`); + _checkIsHttpToken(str), false, + `_checkIsHttpToken(${inspect(str)}) unexpectedly succeeded`); }); @@ -68,8 +67,8 @@ const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; '!@#$%^&*()-_=+\\;\':"[]{}<>,./?|~`' ].forEach(function(str) { assert.strictEqual( - checkInvalidHeaderChar(str), false, - `checkInvalidHeaderChar(${inspect(str)}) unexpectedly failed`); + _checkInvalidHeaderChar(str), false, + `_checkInvalidHeaderChar(${inspect(str)}) unexpectedly failed`); }); // Bad header field values @@ -84,6 +83,6 @@ const checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; 'Ding!\x07' ].forEach(function(str) { assert.strictEqual( - checkInvalidHeaderChar(str), true, - `checkInvalidHeaderChar(${inspect(str)}) unexpectedly succeeded`); + _checkInvalidHeaderChar(str), true, + `_checkInvalidHeaderChar(${inspect(str)}) unexpectedly succeeded`); }); |