@@ -125,8 +125,9 @@ test('Should support H2 connection (headers as array)', async t => {
125125 const server = createSecureServer ( pem )
126126
127127 server . on ( 'stream' , ( stream , headers ) => {
128- t . strictEqual ( headers [ 'x-my-header' ] , 'foo' )
129- t . strictEqual ( headers [ 'x-my-drink' ] , 'coffee,tea' )
128+ t . strictEqual ( headers [ 'x-my-header' ] , 'foo, bar' )
129+ t . strictEqual ( headers [ 'x-my-drink' ] , 'coffee, tea, water' )
130+ t . strictEqual ( headers [ 'x-other' ] , 'value' )
130131 t . strictEqual ( headers [ ':method' ] , 'GET' )
131132 stream . respond ( {
132133 'content-type' : 'text/plain; charset=utf-8' ,
@@ -146,14 +147,20 @@ test('Should support H2 connection (headers as array)', async t => {
146147 allowH2 : true
147148 } )
148149
149- t = tspl ( t , { plan : 7 } )
150+ t = tspl ( t , { plan : 8 } )
150151 after ( ( ) => server . close ( ) )
151152 after ( ( ) => client . close ( ) )
152153
153154 const response = await client . request ( {
154155 path : '/' ,
155156 method : 'GET' ,
156- headers : [ 'x-my-header' , 'foo' , 'x-my-drink' , [ 'coffee' , 'tea' ] ]
157+ headers : [
158+ 'x-my-header' , 'foo' ,
159+ 'x-my-drink' , [ 'coffee' , 'tea' ] ,
160+ 'x-my-drink' , 'water' ,
161+ 'X-My-Header' , 'bar' ,
162+ 'x-other' , 'value'
163+ ]
157164 } )
158165
159166 response . body . on ( 'data' , chunk => {
0 commit comments