michaelpeskov/tests/unit/i18n.test.ts

15 lines
552 B
TypeScript

import { supportedLocales } from '@/lib/i18n'
describe('i18n', () => {
it('supports en and de', () => {
expect(supportedLocales).toContain('en')
expect(supportedLocales).toContain('de')
})
it('has hero strings in both locales', async () => {
const enHome = (await import('@/locales/en/home.json')).default as any
const deHome = (await import('@/locales/de/home.json')).default as any
expect(enHome.hero.headline1.title.length).toBeGreaterThan(10)
expect(deHome.hero.headline1.title.length).toBeGreaterThan(10)
})
})