Skip to content

Commit e39302f

Browse files
committed
fix: faulty waitFor
1 parent a10674d commit e39302f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

package/src/__tests__/offline-support/offline-feature.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,9 @@ export const Generic = () => {
520520
useMockedApis(chatClient, [queryChannelsApi(channels)]);
521521

522522
renderComponent();
523-
await waitFor(async () => {
524-
act(() => dispatchConnectionChangedEvent(chatClient));
525-
await act(
526-
async () => await chatClient.offlineDb.syncManager.invokeSyncStatusListeners(true),
527-
);
523+
act(() => dispatchConnectionChangedEvent(chatClient));
524+
await act(async () => await chatClient.offlineDb.syncManager.invokeSyncStatusListeners(true));
525+
await waitFor(() => {
528526
expect(screen.getByTestId('channel-list')).toBeTruthy();
529527
});
530528

0 commit comments

Comments
 (0)