fix(bot): wire aiOpponent into joined and update server messages
This commit is contained in:
@@ -105,6 +105,9 @@ describe('AI game / Casual', () => {
|
||||
human.send({ type: 'hello', gameId, token: creatorToken });
|
||||
const joined = await human.waitFor((m) => m.type === 'joined');
|
||||
expect(joined.type === 'joined' && joined.you).toBe('b');
|
||||
if (joined.type === 'joined') {
|
||||
expect(joined.aiOpponent).toEqual({ color: 'w', brain: 'casual' });
|
||||
}
|
||||
|
||||
// Bot's opening move should arrive as an update (bot moves first as white).
|
||||
const botMoved = await human.waitFor((m) =>
|
||||
|
||||
Reference in New Issue
Block a user