diff options
Diffstat (limited to 'web/test/gameLogic.test.ts')
| -rw-r--r-- | web/test/gameLogic.test.ts | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/web/test/gameLogic.test.ts b/web/test/gameLogic.test.ts index 263ba14..891aaff 100644 --- a/web/test/gameLogic.test.ts +++ b/web/test/gameLogic.test.ts @@ -10,9 +10,10 @@ import { classColor, classIcon, monsterImage } from '$lib/game/art'; import { characterStatCounters, standeeFigureId, - standeeStatCounters, - type ModifierDeckJson + standeeStatCounters } from '$lib/game/stats'; +import type { ModifierDeck } from '$lib/protocol/types'; +import { emptyModifierDeck } from './fixtures'; import { t, hasLocaleKey, availableLocales } from '$lib/i18n'; describe('elements', () => { @@ -78,8 +79,8 @@ describe('art', () => { }); describe('stat counters', () => { - function deck(cards: { gfx: string }[]): ModifierDeckJson { - return { drawPile: cards, discardPile: [] }; + function deck(cards: { gfx: string }[]): ModifierDeck { + return { ...emptyModifierDeck(), drawPile: cards }; } it('standeeFigureId is name + gfx + standeeNr', () => { @@ -142,8 +143,21 @@ describe('i18n', () => { expect(t('noSuchKey')).toBe('noSuchKey'); }); - it('only English is ported in Phase 3', () => { - expect(availableLocales).toEqual(['en']); + it('offers every in-game locale; only English has a UI table', () => { + // Phase 4: in-game card text is translated for all locales, so the + // picker lists them all; the UI strings fall back to English. + expect(availableLocales).toEqual([ + 'en', + 'de', + 'es', + 'fr', + 'ko', + 'pl', + 'ru', + 'th', + 'zh', + 'zh_Hant' + ]); expect(hasLocaleKey('draw')).toBe(true); }); }); |
