admin/lib/seo/categoryLandings.test.ts
alisaza e1eaf5eff5 feat: initial ghabilee-admin backoffice app
Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js
app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
2026-09-05 13:12:59 +03:30

30 lines
954 B
TypeScript

import { describe, expect, it } from 'vitest'
import { CATEGORY_LANDINGS } from '@/lib/seo/categoryLandings'
const EXPECTED_SLUGS = [
'arts-culture',
'learning-experience',
'games-entertainment',
'sports-adventure',
'food-gatherings',
'conversation-connection',
] as const
describe('category landing copy', () => {
it('covers every live event category with unique editorial content and FAQs', () => {
expect(Object.keys(CATEGORY_LANDINGS).sort()).toEqual([...EXPECTED_SLUGS].sort())
const intros = Object.values(CATEGORY_LANDINGS).map((landing) => landing.intro)
expect(new Set(intros).size).toBe(EXPECTED_SLUGS.length)
for (const landing of Object.values(CATEGORY_LANDINGS)) {
expect(landing.intro.length).toBeGreaterThan(80)
expect(landing.article.title.length).toBeGreaterThan(20)
expect(landing.article.body.length).toBeGreaterThan(1_000)
expect(landing.faqs).toHaveLength(7)
}
})
})