|
| 1 | +import { describe, it, expect } from 'vitest'; |
| 2 | +import { SVG_WIDTH, SVG_HEIGHT, FONT_MAP, isFontKey } from './generatorConstants'; |
| 3 | + |
| 4 | +describe('generatorConstants', () => { |
| 5 | + it('SVG_WIDTH equals 600', () => { |
| 6 | + expect(SVG_WIDTH).toBe(600); |
| 7 | + }); |
| 8 | + |
| 9 | + it('SVG_HEIGHT equals 420', () => { |
| 10 | + expect(SVG_HEIGHT).toBe(420); |
| 11 | + }); |
| 12 | + |
| 13 | + it('FONT_MAP jetbrains contains JetBrains Mono', () => { |
| 14 | + expect(FONT_MAP.jetbrains).toContain('JetBrains Mono'); |
| 15 | + }); |
| 16 | + |
| 17 | + it('FONT_MAP fira contains Fira Code', () => { |
| 18 | + expect(FONT_MAP.fira).toContain('Fira Code'); |
| 19 | + }); |
| 20 | + |
| 21 | + it('FONT_MAP roboto contains Roboto', () => { |
| 22 | + expect(FONT_MAP.roboto).toContain('Roboto'); |
| 23 | + }); |
| 24 | + |
| 25 | + it('isFontKey returns true for jetbrains', () => { |
| 26 | + expect(isFontKey('jetbrains')).toBe(true); |
| 27 | + }); |
| 28 | + |
| 29 | + it('isFontKey returns true for roboto', () => { |
| 30 | + expect(isFontKey('roboto')).toBe(true); |
| 31 | + }); |
| 32 | + |
| 33 | + it('isFontKey returns false for unknown-font', () => { |
| 34 | + expect(isFontKey('unknown-font')).toBe(false); |
| 35 | + }); |
| 36 | + |
| 37 | + it('isFontKey returns false for empty string', () => { |
| 38 | + expect(isFontKey('')).toBe(false); |
| 39 | + }); |
| 40 | +}); |
0 commit comments