From 6770cbfee159ba97a78af5395ed5b7773e0c5ef6 Mon Sep 17 00:00:00 2001 From: Lam Wei Li Date: Wed, 3 Aug 2022 09:39:00 +0800 Subject: [PATCH] Removed explicit http2 headers for less verbosity (using default values) --- test/session.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/session.js b/test/session.js index 155d855a..e8e635c0 100644 --- a/test/session.js +++ b/test/session.js @@ -2313,10 +2313,7 @@ describe('session()', function(){ }) server.on('listening', function () { var client = createHttp2Client(server.address().port) - // using ES5 as Node.js <=4.0.0 does not have Computed Property Names - var reqHeaders = {} - reqHeaders[http2.constants.HTTP2_HEADER_PATH] = '/' - var request = client.request(reqHeaders) + var request = client.request({}) request.on('response', function (headers) { assert.strictEqual(headers[http2.constants.HTTP2_HEADER_STATUS], 200) assert.strictEqual(headers[http2.constants.HTTP2_HEADER_CONTENT_TYPE], 'text/plain')