mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-23 11:29:09 -05:00
4d560be350
Adds internal over-the-air update support Powered by `react-native-nitro-modules`, this OTA functionality is faster than the previous implementation, and won't slow down the UI when updates are being applied since updates occur off the main thread
22 lines
638 B
TypeScript
22 lines
638 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),
|
|
})),
|
|
}))
|
|
|
|
// 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(),
|
|
}))
|