@@ -2275,10 +2275,10 @@ describe('resumable-upload', () => {
22752275 describe ( '500s' , ( ) => {
22762276 const RESP = { status : 500 , data : 'error message from server' } ;
22772277
2278- it ( 'should increase the retry count if less than limit' , async ( ) => {
2278+ it ( 'should increase the retry count if less than limit' , ( ) => {
22792279 up . getRetryDelay = ( ) => 1 ;
22802280 assert . strictEqual ( up . numRetries , 0 ) ;
2281- assert . strictEqual ( await up . onResponse ( RESP ) , false ) ;
2281+ assert . strictEqual ( up . onResponse ( RESP ) , false ) ;
22822282 assert . strictEqual ( up . numRetries , 1 ) ;
22832283 } ) ;
22842284
@@ -2292,12 +2292,10 @@ describe('resumable-upload', () => {
22922292 done ( ) ;
22932293 } ;
22942294
2295- ( async ( ) => {
2296- await up . onResponse ( RESP ) ;
2297- await up . onResponse ( RESP ) ;
2298- await up . onResponse ( RESP ) ;
2299- await up . onResponse ( RESP ) ;
2300- } ) ( ) . catch ( done ) ;
2295+ up . onResponse ( RESP ) ;
2296+ up . onResponse ( RESP ) ;
2297+ up . onResponse ( RESP ) ;
2298+ up . onResponse ( RESP ) ;
23012299 } ) ;
23022300
23032301 describe ( 'exponential back off' , ( ) => {
@@ -2323,7 +2321,7 @@ describe('resumable-upload', () => {
23232321 assert ( delay <= maxTime ) ;
23242322
23252323 // make it keep retrying until the limit is reached
2326- void up . onResponse ( RESP ) ;
2324+ up . onResponse ( RESP ) ;
23272325 } ;
23282326
23292327 up . on ( 'error' , ( err : Error ) => {
@@ -2335,7 +2333,7 @@ describe('resumable-upload', () => {
23352333 done ( ) ;
23362334 } ) ;
23372335
2338- void up . onResponse ( RESP ) ;
2336+ up . onResponse ( RESP ) ;
23392337 clock . runAll ( ) ;
23402338 } ) ;
23412339 } ) ;
@@ -2350,22 +2348,22 @@ describe('resumable-upload', () => {
23502348 assert . strictEqual ( resp , RESP ) ;
23512349 done ( ) ;
23522350 } ) ;
2353- void up . onResponse ( RESP ) ;
2351+ up . onResponse ( RESP ) ;
23542352 } ) ;
23552353
2356- it ( 'should return true' , async ( ) => {
2354+ it ( 'should return true' , ( ) => {
23572355 up . getRetryDelay = ( ) => 1 ;
2358- assert . strictEqual ( await up . onResponse ( RESP ) , true ) ;
2356+ assert . strictEqual ( up . onResponse ( RESP ) , true ) ;
23592357 } ) ;
23602358
2361- it ( 'should handle a custom status code when passed a retry function' , async ( ) => {
2359+ it ( 'should handle a custom status code when passed a retry function' , ( ) => {
23622360 up . getRetryDelay = ( ) => 1 ;
23632361 const RESP = { status : 1000 } ;
23642362 const customHandlerFunction = ( err : ApiError ) => {
23652363 return err . code === 1000 ;
23662364 } ;
23672365 up . retryOptions . retryableErrorFn = customHandlerFunction ;
2368- assert . strictEqual ( await up . onResponse ( RESP ) , false ) ;
2366+ assert . strictEqual ( up . onResponse ( RESP ) , false ) ;
23692367 } ) ;
23702368 } ) ;
23712369 } ) ;
0 commit comments