Skip to content

createTestTable

createTestTable<G>(game, options?): Promise<TestTable<G>>

Defined in: testing/test-table.ts:218

Creates a table for testing game rules without a server or sockets.

const t = await createTestTable(ticTacToe, { players: 2 });
await t.act(0, 'place', { cell: 4 });
expect(t.state.board[4]).toBe('X');

G extends AnyGame

G

TestTableOptions

Promise<TestTable<G>>