add missing requests/responses

This commit is contained in:
seavor 2026-04-16 01:28:42 -05:00
parent f0c3581d26
commit 4b5f66d497
27 changed files with 382 additions and 10 deletions

View file

@ -34,6 +34,7 @@ import { nextTurn } from './nextTurn';
import { readyStart } from './readyStart';
import { revealCards } from './revealCards';
import { reverseTurn } from './reverseTurn';
import { rollDie } from './rollDie';
import { setActivePhase } from './setActivePhase';
import { setCardAttr } from './setCardAttr';
import { setCardCounter } from './setCardCounter';
@ -262,6 +263,13 @@ describe('Game commands — delegate to WebClient.instance.protobuf.sendGameComm
expect(WebClient.instance.protobuf.sendGameCommand).toHaveBeenCalledWith(gameId, Data.Command_Unconcede_ext, expect.any(Object));
});
it('rollDie sends Command_RollDie', () => {
rollDie(gameId, { sides: 6, count: 2 });
expect(WebClient.instance.protobuf.sendGameCommand).toHaveBeenCalledWith(
gameId, Data.Command_RollDie_ext, expect.objectContaining({ sides: 6, count: 2 })
);
});
it('judge sends Command_Judge with targetId and wrapped gameCommand array', () => {
const targetId = 3;
const innerCmd = create(Data.GameCommandSchema);