@@ -1817,7 +1817,6 @@ abc123def456789012345678901234567890123456789012345678901234abcd
18171817 } )
18181818 } )
18191819
1820-
18211820 describe ( 'hooks' , ( ) => {
18221821 it ( 'should call onRequest with method, url, headers, and timeout' , async ( ) => {
18231822 const requestInfos : HttpHookRequestInfo [ ] = [ ]
@@ -1849,7 +1848,9 @@ abc123def456789012345678901234567890123456789012345678901234abcd
18491848 expect ( responseInfos [ 0 ] ! . statusText ) . toBe ( 'OK' )
18501849 expect ( responseInfos [ 0 ] ! . duration ) . toBeGreaterThanOrEqual ( 0 )
18511850 expect ( responseInfos [ 0 ] ! . error ) . toBeUndefined ( )
1852- expect ( responseInfos [ 0 ] ! . headers ?. [ 'content-type' ] ) . toContain ( 'application/json' )
1851+ expect ( responseInfos [ 0 ] ! . headers ?. [ 'content-type' ] ) . toContain (
1852+ 'application/json' ,
1853+ )
18531854 } )
18541855
18551856 it ( 'should call onResponse with error on timeout' , async ( ) => {
@@ -2033,7 +2034,9 @@ abc123def456789012345678901234567890123456789012345678901234abcd
20332034 const response = await httpRequest ( `${ httpBaseUrl } /json` )
20342035 expect ( response . rawResponse ) . toBeDefined ( )
20352036 expect ( response . rawResponse ! . statusCode ) . toBe ( 200 )
2036- expect ( response . rawResponse ! . headers [ 'content-type' ] ) . toContain ( 'application/json' )
2037+ expect ( response . rawResponse ! . headers [ 'content-type' ] ) . toContain (
2038+ 'application/json' ,
2039+ )
20372040 } )
20382041
20392042 it ( 'should be from final response after redirect' , async ( ) => {
@@ -2063,14 +2066,18 @@ abc123def456789012345678901234567890123456789012345678901234abcd
20632066 [ 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' , 'SSL/TLS certificate error' ] ,
20642067 ]
20652068 for ( const [ code , expected ] of cases ) {
2066- const err = Object . assign ( new Error ( 'test' ) , { code } ) as NodeJS . ErrnoException
2069+ const err = Object . assign ( new Error ( 'test' ) , {
2070+ code,
2071+ } ) as NodeJS . ErrnoException
20672072 const msg = enrichErrorMessage ( 'http://example.com' , 'GET' , err )
20682073 expect ( msg ) . toContain ( expected )
20692074 }
20702075 } )
20712076
20722077 it ( 'should include method, url, and error code in message' , ( ) => {
2073- const err = Object . assign ( new Error ( 'fail' ) , { code : 'ESOMETHING' } ) as NodeJS . ErrnoException
2078+ const err = Object . assign ( new Error ( 'fail' ) , {
2079+ code : 'ESOMETHING' ,
2080+ } ) as NodeJS . ErrnoException
20742081 const msg = enrichErrorMessage ( 'http://my-server:8080/api' , 'DELETE' , err )
20752082 expect ( msg ) . toContain ( 'DELETE request failed' )
20762083 expect ( msg ) . toContain ( 'http://my-server:8080/api' )
0 commit comments