feat: improve initial load performance on mobile (#2126)

This commit is contained in:
Mo
2023-01-03 14:15:45 -06:00
committed by GitHub
parent a447fa1ad7
commit 3c332a35f6
59 changed files with 868 additions and 3003 deletions

View File

@@ -25,7 +25,7 @@ describe('application', () => {
device = {} as jest.Mocked<DeviceInterface>
device.openDatabase = jest.fn().mockResolvedValue(true)
device.getAllRawDatabasePayloads = jest.fn().mockReturnValue([])
device.getAllDatabaseEntries = jest.fn().mockReturnValue([])
device.setRawStorageValue = jest.fn()
device.getRawStorageValue = jest.fn().mockImplementation((key) => {
if (key === namespacedKey(identifier, RawStorageKey.SnjsVersion)) {
@@ -33,9 +33,6 @@ describe('application', () => {
}
return undefined
})
device.getDatabaseKeys = async () => {
return Promise.resolve(['1', '2', '3'])
}
application = new SNApplication({
environment: Environment.Mobile,
@@ -75,7 +72,6 @@ describe('application', () => {
currentPersistPromise: false,
isStorageWrapped: false,
allRawPayloadsCount: 0,
databaseKeys: ['1', '2', '3'],
},
encryption: expect.objectContaining({
getLatestVersion: '004',