mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
add missing requests/responses
This commit is contained in:
parent
f0c3581d26
commit
4b5f66d497
27 changed files with 382 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue