← Back to list

testing
by jhlee0409
세상에서 가장 맛있는 사이드 프로젝트 레스토랑
⭐ 0🍴 0📅 Jan 3, 2026
SKILL.md
name: testing description: Writes tests using Vitest and Testing Library. Use when creating unit tests, API tests, component tests, or mocking Firebase/external services. Includes test patterns, assertions, and coverage targets.
Testing Skill
Instructions
- Place tests in
src/__tests__/ - Use
describe/it/expectpattern - Mock Firebase with helpers in
helpers/mock-firebase.ts - Run:
pnpm test(watch) orpnpm test:run(once)
Test Template
import { describe, it, expect, beforeEach, vi } from 'vitest'
describe('functionName', () => {
beforeEach(() => vi.clearAllMocks())
it('should do something when condition', () => {
const result = functionName(input)
expect(result).toBe('expected')
})
it('should throw error for invalid input', () => {
expect(() => functionName(null)).toThrow('Error')
})
})
Common Assertions
expect(value).toBe(expected)
expect(value).toEqual({ key: 'value' })
expect(array).toContain(item)
expect(fn).toHaveBeenCalledWith(arg)
expect(async () => await fn()).rejects.toThrow()
Coverage Targets
- Statements: 80%
- Branches: 70%
- Functions: 80%
For mocking patterns, API testing, and component testing, see reference.md.
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon