Files
App/jest/setup/nitro-ota.ts
T
Ritesh Shukla b8437898f5 PR try on (#665)
* feat:- PR changes

* feat:- PR changes

* feat:- OTA

* feat:- OTA

* fix: tests
2025-11-11 22:00:49 +05:30

24 lines
704 B
TypeScript

// Mock for react-native-nitro-ota
jest.mock('react-native-nitro-ota', () => ({
githubOTA: jest.fn(() => ({
downloadUrl: 'mock://download.url',
versionUrl: 'mock://version.url',
})),
OTAUpdateManager: jest.fn().mockImplementation(() => ({
checkForUpdates: jest.fn().mockResolvedValue(null),
downloadUpdate: jest.fn().mockResolvedValue(undefined),
})),
reloadApp: jest.fn(),
getStoredOtaVersion: jest.fn(() => null),
}))
// Update the existing nitro-modules mock to include createHybridObject
jest.mock('react-native-nitro-modules', () => ({
NitroModules: {
createModule: jest.fn(),
install: jest.fn(),
createHybridObject: jest.fn(() => ({})),
},
createNitroModule: jest.fn(),
}))