()
| 47 | } |
| 48 | |
| 49 | const mockAppearance = () => { |
| 50 | jest.mock('react-native/Libraries/Utilities/Appearance', () => { |
| 51 | const realApp = jest.requireActual( |
| 52 | 'react-native/Libraries/Utilities/Appearance' |
| 53 | ); |
| 54 | const listeners: Function[] = []; |
| 55 | return { |
| 56 | ...realApp, |
| 57 | addChangeListener: jest.fn((cb) => { |
| 58 | listeners.push(cb); |
| 59 | }), |
| 60 | removeChangeListener: jest.fn((cb) => { |
| 61 | listeners.push(cb); |
| 62 | }), |
| 63 | getColorScheme: jest.fn(() => { |
| 64 | return 'light'; |
| 65 | }), |
| 66 | __internalListeners: listeners, |
| 67 | }; |
| 68 | }); |
| 69 | }; |
| 70 | |
| 71 | const mockAccessibilityInfo = () => { |
| 72 | jest.mock( |
no test coverage detected
searching dependent graphs…