mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -07:00
use component hooks
This commit is contained in:
parent
515dff6d7b
commit
3aa8c654cc
81 changed files with 5203 additions and 3173 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { fireEvent, screen } from '@testing-library/react';
|
||||
import { act, fireEvent, screen } from '@testing-library/react';
|
||||
import { create } from '@bufbuild/protobuf';
|
||||
import {
|
||||
renderWithProviders,
|
||||
|
|
@ -241,12 +241,12 @@ describe('GameSelector', () => {
|
|||
});
|
||||
|
||||
mockNavigate.mockClear();
|
||||
store.dispatch({
|
||||
type: GameTypes.GAME_JOINED,
|
||||
payload: { data: { gameInfo: { gameId: 42 }, hostId: 0, playerId: 0, spectator: false } },
|
||||
await act(async () => {
|
||||
store.dispatch({
|
||||
type: GameTypes.GAME_JOINED,
|
||||
payload: { data: { gameInfo: { gameId: 42 }, hostId: 0, playerId: 0, spectator: false } },
|
||||
});
|
||||
});
|
||||
|
||||
await Promise.resolve();
|
||||
expect(mockNavigate).toHaveBeenCalledWith(App.RouteEnum.GAME);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue