@@ -114,9 +114,9 @@ describe('Core Tests', () => {
114114 } ) ;
115115
116116 it ( 'supports gzip/deflate/br content encoding (default)' , async ( ) => {
117- const resp = await defaultCtx . request ( 'https://example.com /' ) ;
117+ const resp = await defaultCtx . request ( 'https://www.aem.live /' ) ;
118118 assert . strictEqual ( resp . statusCode , 200 ) ;
119- assert . strictEqual ( resp . headers [ 'content-encoding' ] , ' gzip' ) ;
119+ assert . match ( resp . headers [ 'content-encoding' ] , / ^ g z i p | b r $ / ) ;
120120 } ) ;
121121
122122 it ( 'supports disabling gzip/deflate/br content encoding' , async ( ) => {
@@ -126,21 +126,21 @@ describe('Core Tests', () => {
126126 } ) ;
127127
128128 it ( 'supports gzip/deflate/br content decoding (default)' , async ( ) => {
129- const resp = await defaultCtx . request ( 'https://example.com /' ) ;
129+ const resp = await defaultCtx . request ( 'https://www.aem.live /' ) ;
130130 assert . strictEqual ( resp . statusCode , 200 ) ;
131- assert . strictEqual ( resp . headers [ 'content-encoding' ] , ' gzip' ) ;
131+ assert . match ( resp . headers [ 'content-encoding' ] , / ^ g z i p | b r $ / ) ;
132132 assert ( isReadableStream ( resp . readable ) ) ;
133133 const buf = await readStream ( resp . readable ) ;
134134 const body = buf . toString ( ) ;
135- assert ( body . startsWith ( '<!doctype html>' ) ) ;
135+ assert ( body . startsWith ( '<!DOCTYPE html>' ) ) ;
136136 assert ( + resp . headers [ 'content-length' ] < body . length ) ;
137137 assert . strictEqual ( resp . decoded , true ) ;
138138 } ) ;
139139
140140 it ( 'supports disabling gzip/deflate/br content decoding' , async ( ) => {
141- const resp = await defaultCtx . request ( 'https://example.com /' , { decode : false } ) ;
141+ const resp = await defaultCtx . request ( 'https://www.aem.live /' , { decode : false } ) ;
142142 assert . strictEqual ( resp . statusCode , 200 ) ;
143- assert . strictEqual ( resp . headers [ 'content-encoding' ] , ' gzip' ) ;
143+ assert . match ( resp . headers [ 'content-encoding' ] , / ^ g z i p | b r $ / ) ;
144144 assert ( isReadableStream ( resp . readable ) ) ;
145145 const buf = await readStream ( resp . readable ) ;
146146 assert . strictEqual ( + resp . headers [ 'content-length' ] , buf . length ) ;
@@ -557,7 +557,7 @@ describe('Core Tests', () => {
557557 const resp = await defaultCtx . request ( `${ server . origin } /gzip` ) ;
558558 assert . strictEqual ( resp . statusCode , 200 ) ;
559559 assert ( resp . headers [ 'content-type' ] . startsWith ( 'text/plain' ) ) ;
560- assert . strictEqual ( resp . headers [ 'content-encoding' ] , ' gzip' ) ;
560+ assert . match ( resp . headers [ 'content-encoding' ] , / ^ g z i p | b r $ / ) ;
561561 const buf = await readStream ( resp . readable ) ;
562562 assert . strictEqual ( buf . toString ( ) , HELLO_WORLD ) ;
563563 } ) ;
0 commit comments