@@ -47,7 +47,6 @@ vi.mock('../utils/cache/store', () => {
4747vi . mock ( '@react-native-community/netinfo' , ( ) => {
4848 return { NetInfoState : { } , addEventListener : vi . fn ( ) } ;
4949} ) ;
50- let isNetInfoAvailable = true ;
5150let isAsyncStorageAvailable = true ;
5251
5352await vi . hoisted ( async ( ) => {
@@ -60,15 +59,10 @@ async function mockRequireNetInfo() {
6059
6160 M . _load_original = M . _load ;
6261 M . _load = ( uri : string , parent : string ) => {
63- if ( uri === '@react-native-community/netinfo' ) {
64- if ( isNetInfoAvailable ) return { } ;
65- throw new Error ( "Module not found: @react-native-community/netinfo" ) ;
66- }
6762 if ( uri === '@react-native-async-storage/async-storage' ) {
6863 if ( isAsyncStorageAvailable ) return { } ;
6964 throw new Error ( "Module not found: @react-native-async-storage/async-storage" ) ;
7065 }
71-
7266 return M . _load_original ( uri , parent ) ;
7367 } ;
7468}
@@ -87,7 +81,6 @@ describe('createForwardingEventProcessor', () => {
8781
8882 beforeEach ( ( ) => {
8983 mockGetForwardingEventProcessor . mockClear ( ) ;
90- isNetInfoAvailable = false ;
9184 } ) ;
9285
9386 it ( 'returns forwarding event processor by calling getForwardingEventProcessor with the provided dispatcher' , ( ) => {
0 commit comments