feat(phase1): showcase 데모 메타 단일 소스 + 무결성 테스트

- /showcase 제작 사례 허브가 소비할 데모 8종 메타 모듈화
- slug/title/description/tags 필수 필드 검증 테스트 3건
- Task 2(showcase 라우트)가 SHOWCASE_SAMPLES import 가능

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-02 15:01:43 +09:00
parent 6234f4277a
commit e5ff5ec84f
2 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
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]+$/);
}
});
});