diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-01-24 19:32:24 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-24 19:32:24 -0600 |
commit | 869f6c4e0e464b7f5be9ef5676210ae8844bd834 (patch) | |
tree | a9a823723099129bb25c4b57435925b481d54266 /__tests__ | |
parent | 21f5f4de157a73b3c4406461b2a36555b1bff228 (diff) | |
download | voidsky-869f6c4e0e464b7f5be9ef5676210ae8844bd834.tar.zst |
Initial pass at push notifications + some fixes to the session management (#91)
* Fix: test the session during resume to ensure it's valid * Don't delete sessions for now * Add notifee and request notif permissions on first login * Set unread notifications badge on app icon * Trigger a notifee card on new notifications * Experimental: use react-native-background-fetch to check for notifications * Add missing mocks * Fix to resumeSession()
Diffstat (limited to '__tests__')
-rw-r--r-- | __tests__/state/models/me.test.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/__tests__/state/models/me.test.ts b/__tests__/state/models/me.test.ts index fa8d49601..b69e43477 100644 --- a/__tests__/state/models/me.test.ts +++ b/__tests__/state/models/me.test.ts @@ -160,7 +160,7 @@ describe('MeModel', () => { it('should update notifs count with fetchStateUpdate()', async () => { meModel.notifications = { - refresh: jest.fn(), + refresh: jest.fn().mockResolvedValue({}), } as unknown as NotificationsViewModel jest @@ -173,7 +173,7 @@ describe('MeModel', () => { }) }) - await meModel.fetchStateUpdate() + await meModel.fetchNotifications() expect(meModel.notificationCount).toBe(1) expect(meModel.notifications.refresh).toHaveBeenCalled() }) |