import { describe, it, expect } from 'vitest';
import { SHOWCASE_SAMPLES } from '../showcase-samples';

const EXPECTED_SLUGS = [
  'bakery', 'corporate', 'dashboard', 'game',
  'interior', 'portfolio', 'reading', 'shopping',
];

describe('SHOWCASE_SAMPLES', () => {
  it('데모 8종의 slug가 정확히 존재한다', () => {
    expect(SHOWCASE_SAMPLES.map((s) => s.slug).sort()).toEqual([...EXPECTED_SLUGS].sort());
  });

  it('모든 항목에 title/description/tags가 채워져 있다', () => {
    for (const s of SHOWCASE_SAMPLES) {
      expect(s.title.length).toBeGreaterThan(0);
      expect(s.description.length).toBeGreaterThan(0);
      expect(s.tags.length).toBeGreaterThan(0);
    }
  });

  it('demo 경로는 /work/website/samples/[slug] 형식이다', () => {
    for (const s of SHOWCASE_SAMPLES) {
      expect(`/work/website/samples/${s.slug}`).toMatch(/^\/work\/website\/samples\/[a-z]+$/);
    }
  });
});
