import { definitionGroups, TEA_DEFINITIONS } from './tea-definitions'; describe('TEA definitions', () => { it('are shown only for the TEA domain', () => { expect(definitionGroups('tea')).toBe(TEA_DEFINITIONS); expect(definitionGroups('cacu')).toEqual([]); expect(definitionGroups('cama')).toEqual([]); }); it('have unique group ids and no empty entries', () => { const ids = TEA_DEFINITIONS.map((g) => g.id); expect(new Set(ids).size).toBe(ids.length); for (const group of TEA_DEFINITIONS) { expect(group.entries.length).toBeGreaterThan(0); for (const entry of group.entries) { expect(entry.term.trim()).not.toBe(''); expect(entry.text.trim()).not.toBe(''); } } }); });