@@ -1089,9 +1089,8 @@ test.group('Response', (group) => {
10891089 response . finish ( )
10901090 } )
10911091
1092- const { header } = await supertest ( url ) . get ( '/' ) . expect ( 200 )
1093-
1094- const cookies = header [ 'set-cookie' ] . map ( ( cookie : string ) => {
1092+ const response = await supertest ( url ) . get ( '/' ) . expect ( 200 )
1093+ const cookies = response . get ( 'Set-Cookie' ) . map ( ( cookie : string ) => {
10951094 const [ value , ...options ] = cookie . split ( ';' )
10961095 const parser = new CookieParser ( value , encryption )
10971096 return {
@@ -1115,8 +1114,8 @@ test.group('Response', (group) => {
11151114 response . finish ( )
11161115 } )
11171116
1118- const { header } = await supertest ( url ) . get ( '/' ) . expect ( 200 )
1119- const cookies = header [ 'set-cookie' ] . map ( ( cookie : string ) => {
1117+ const response = await supertest ( url ) . get ( '/' ) . expect ( 200 )
1118+ const cookies = response . get ( 'Set-Cookie' ) . map ( ( cookie : string ) => {
11201119 const [ value , ...options ] = cookie . split ( ';' )
11211120 const parser = new CookieParser ( value , encryption )
11221121 return {
@@ -1140,9 +1139,9 @@ test.group('Response', (group) => {
11401139 response . finish ( )
11411140 } )
11421141
1143- const { header } = await supertest ( url ) . get ( '/' ) . expect ( 200 )
1142+ const response = await supertest ( url ) . get ( '/' ) . expect ( 200 )
11441143
1145- const cookies = header [ 'set-cookie' ] . map ( ( cookie : string ) => {
1144+ const cookies = response . get ( 'Set-Cookie' ) . map ( ( cookie : string ) => {
11461145 const [ value , ...options ] = cookie . split ( ';' )
11471146 const parser = new CookieParser ( value , encryption )
11481147 return {
@@ -1183,9 +1182,9 @@ test.group('Response', (group) => {
11831182 response . finish ( )
11841183 } )
11851184
1186- const { header } = await supertest ( url ) . get ( '/' ) . expect ( 200 )
1185+ const response = await supertest ( url ) . get ( '/' ) . expect ( 200 )
11871186
1188- const cookies = header [ 'set-cookie' ] . map ( ( cookie : string ) => {
1187+ const cookies = response . get ( 'Set-Cookie' ) . map ( ( cookie : string ) => {
11891188 const [ value , ...options ] = cookie . split ( ';' )
11901189 const parser = new CookieParser ( value , encryption )
11911190 return {
@@ -1209,9 +1208,9 @@ test.group('Response', (group) => {
12091208 response . finish ( )
12101209 } )
12111210
1212- const { header } = await supertest ( url ) . get ( '/' ) . expect ( 200 )
1211+ const response = await supertest ( url ) . get ( '/' ) . expect ( 200 )
12131212
1214- const cookies = header [ 'set-cookie' ] . map ( ( cookie : string ) => {
1213+ const cookies = response . get ( 'Set-Cookie' ) . map ( ( cookie : string ) => {
12151214 const [ value , ...options ] = cookie . split ( ';' )
12161215 return {
12171216 value : value . split ( '=' ) [ 1 ] || null ,
0 commit comments