mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
cleanup testing utilities, documentation, and AI commentary
This commit is contained in:
parent
bd2382c94e
commit
ef6cea6f6c
150 changed files with 891 additions and 1233 deletions
|
|
@ -2,8 +2,9 @@ import type { WebClient } from '@app/websocket';
|
|||
|
||||
/**
|
||||
* Creates a mock WebClient whose `request` property has vi.fn() stubs
|
||||
* for every service method that containers/forms call. Inject this into
|
||||
* tests via `renderWithProviders({ webClient: createMockWebClient() })`.
|
||||
* for every service method that containers/forms call. Inject via a
|
||||
* vi.hoisted reference returned from a `vi.mock('@app/hooks', ...)` stub
|
||||
* of `useWebClient`; see LoginForm.spec.tsx for the canonical pattern.
|
||||
*/
|
||||
export function createMockWebClient() {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue