Skip to content

Commit

Permalink
add reconnectApp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arosiclair committed Jan 24, 2025
1 parent d2591f1 commit 704bdcb
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions tests/actions/AppTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,26 @@ describe('actions/App', () => {
await waitForBatchedUpdates();

// The lastFullReconnecTime should be updated
const lastFullReconnectTime = await getOnyxValue(ONYXKEYS.LAST_FULL_RECONNECT_TIME);
expect(lastFullReconnectTime).toBeTruthy();
expect(await getOnyxValue(ONYXKEYS.LAST_FULL_RECONNECT_TIME)).toBeTruthy();
});

test('lastFullReconnectTime - full reconnectApp', async () => {
// When Open App runs
App.reconnectApp();
App.confirmReadyToOpenApp();
await waitForBatchedUpdates();

// The lastFullReconnecTime should be updated
expect(await getOnyxValue(ONYXKEYS.LAST_FULL_RECONNECT_TIME)).toBeTruthy();
});

test('lastFullReconnectTime - incremental reconnectApp', async () => {
// When Open App runs
App.reconnectApp(123);
App.confirmReadyToOpenApp();
await waitForBatchedUpdates();

// The lastFullReconnecTime should be updated
expect(await getOnyxValue(ONYXKEYS.LAST_FULL_RECONNECT_TIME)).toBeUndefined();
});
});

0 comments on commit 704bdcb

Please sign in to comment.