File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ describe('fallbackToNetwork', () => {
1313 } ) ;
1414
1515 it ( 'not error when configured globally' , async ( ) => {
16+ theGlobal . fetch = async ( ) => ( { status : 202 } ) ;
1617 fm . config . fallbackToNetwork = true ;
1718 fm . mock ( 'http://mocked.com' , 201 ) ;
1819 expect ( ( ) => fm . fetchHandler ( 'http://unmocked.com' ) ) . not . to . throw ( ) ;
20+ delete theGlobal . fetch
1921 } ) ;
2022
2123 it ( 'actually falls back to network when configured globally' , async ( ) => {
@@ -26,6 +28,7 @@ describe('fallbackToNetwork', () => {
2628 expect ( res . status ) . to . equal ( 202 ) ;
2729 fetchMock . restore ( ) ;
2830 fetchMock . config . fallbackToNetwork = false ;
31+ delete theGlobal . fetch
2932 } ) ;
3033
3134 it ( 'actually falls back to network when configured in a sandbox properly' , async ( ) => {
You can’t perform that action at this time.
0 commit comments