mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-23 19:39:35 -05:00
b8437898f5
* feat:- PR changes * feat:- PR changes * feat:- OTA * feat:- OTA * fix: tests
24 lines
704 B
TypeScript
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(),
|
|
}))
|