Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jnowakow committed Dec 9, 2024
1 parent 4ba267d commit f2090bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/ui/UnreadIndicatorsTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ function signInAndGetAppWithUnreadChat(): Promise<void> {
}

describe('Unread Indicators', () => {
afterEach(() => {
beforeAll(() => {
PusherHelper.setup();
});

beforeEach(() => {
jest.clearAllMocks();
Onyx.clear();

Expand Down
2 changes: 2 additions & 0 deletions tests/utils/PusherHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function setup() {
cluster: CONFIG.PUSHER.CLUSTER,
authEndpoint: `${CONFIG.EXPENSIFY.DEFAULT_API_ROOT}api/AuthenticatePusher?`,
});

window.getPusherInstance()?.connection.emit('connected');
}

function emitOnyxUpdate(args: OnyxServerUpdate[]) {
Expand Down

0 comments on commit f2090bf

Please sign in to comment.