Skip to content

Commit da438f8

Browse files
committed
test: fix account settings test
1 parent 7d16d3d commit da438f8

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/routes/Settings.test.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -503,19 +503,22 @@ describe('routes/Settings.tsx', () => {
503503
);
504504
});
505505

506-
it('should open account management', () => {
507-
render(
508-
<AppContext.Provider
509-
value={{
510-
auth: mockAuth,
511-
settings: mockSettings,
512-
}}
513-
>
514-
<MemoryRouter>
515-
<SettingsRoute />
516-
</MemoryRouter>
517-
</AppContext.Provider>,
518-
);
506+
it('should open account management', async () => {
507+
await act(async () => {
508+
render(
509+
<AppContext.Provider
510+
value={{
511+
auth: mockAuth,
512+
settings: mockSettings,
513+
}}
514+
>
515+
<MemoryRouter>
516+
<SettingsRoute />
517+
</MemoryRouter>
518+
</AppContext.Provider>,
519+
);
520+
});
521+
519522
fireEvent.click(screen.getByTitle('Accounts'));
520523
expect(mockNavigate).toHaveBeenCalledWith('/accounts');
521524
});

0 commit comments

Comments
 (0)