mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
harden implementations
This commit is contained in:
parent
c3ae4cffd6
commit
559a3ff1f4
25 changed files with 240 additions and 37 deletions
|
|
@ -80,6 +80,16 @@ describe('RoomPersistence', () => {
|
|||
RoomPersistence.updateGames(1, [game]);
|
||||
expect(NormalizeService.normalizeGameObject).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('returns without error when gameList is empty', () => {
|
||||
expect(() => RoomPersistence.updateGames(1, [])).not.toThrow();
|
||||
expect(RoomsDispatch.updateGames).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('returns without error when gameList is null', () => {
|
||||
expect(() => RoomPersistence.updateGames(1, null as any)).not.toThrow();
|
||||
expect(RoomsDispatch.updateGames).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
it('addMessage normalizes message and dispatches', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue