// Imported before anything else: the texts must not depend on suggestion-texts // having been loaded first. import { CHAIN_TEXTS } from './chain-texts'; import { SUGGESTION_TEXTS } from '../suggestion-texts'; describe('chain texts', () => { it('load on their own and are part of the merged register', () => { expect(Object.keys(CHAIN_TEXTS).length).toBeGreaterThan(0); for (const code of Object.keys(CHAIN_TEXTS)) { expect(SUGGESTION_TEXTS[code]).toBe(CHAIN_TEXTS[code]); } }); it('names the suggestions as the spec does', () => { const lookup = { colonyCode: () => 'V-1', queenCode: () => 'Q-1', treatmentProduct: () => null, apiaryName: () => null, stockItemName: () => null, }; const title = (code: string) => CHAIN_TEXTS[code].render(CHAIN_TEXTS[code].example, lookup, '2026-05-05') .title; expect(title('SPLIT_SCHEDULE_RAISE_OWN')).toBe('Ableger-Plan übernehmen'); expect(title('SPLIT_SCHEDULE_QUEEN_CELL')).toBe('Stifte prüfen'); expect(title('SPLIT_SCHEDULE_QUEEN')).toBe('Annahme der Königin prüfen'); expect(title('QUEEN_CELLS_SWARM_CHECK')).toBe('Schwarmkontrolle'); }); });