@@ -47,7 +47,6 @@ vi.mock('../utils/cache/store', () => {
47
47
vi . mock ( '@react-native-community/netinfo' , ( ) => {
48
48
return { NetInfoState : { } , addEventListener : vi . fn ( ) } ;
49
49
} ) ;
50
- let isNetInfoAvailable = true ;
51
50
let isAsyncStorageAvailable = true ;
52
51
53
52
await vi . hoisted ( async ( ) => {
@@ -60,15 +59,10 @@ async function mockRequireNetInfo() {
60
59
61
60
M . _load_original = M . _load ;
62
61
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
- }
67
62
if ( uri === '@react-native-async-storage/async-storage' ) {
68
63
if ( isAsyncStorageAvailable ) return { } ;
69
64
throw new Error ( "Module not found: @react-native-async-storage/async-storage" ) ;
70
65
}
71
-
72
66
return M . _load_original ( uri , parent ) ;
73
67
} ;
74
68
}
@@ -87,7 +81,6 @@ describe('createForwardingEventProcessor', () => {
87
81
88
82
beforeEach ( ( ) => {
89
83
mockGetForwardingEventProcessor . mockClear ( ) ;
90
- isNetInfoAvailable = false ;
91
84
} ) ;
92
85
93
86
it ( 'returns forwarding event processor by calling getForwardingEventProcessor with the provided dispatcher' , ( ) => {
0 commit comments