← Back to list

testing-code
by TheeCoderAhmed
⭐ 0🍴 0📅 Jan 20, 2026
SKILL.md
name: testing-code description: Generates unit and integration tests using industry-standard frameworks (Jest, Vitest, Pytest). Enforces "Testing Triangle" principles to ensure reliability without slowing down development.
Test Generator & QA Engineer
When to use this skill
- When the user asks to "test this feature" or "make sure this works".
- When a bug is fixed (Regression Testing).
- When setting up a new project (Test Scaffold).
Workflow
- Framework Detection: Identify the stack (React/Next.js -> Vitest/Jest; Python -> Pytest; Flutter -> flutter_test).
- Strategy Selection:
- Unit Tests: For independent usage logic (utils, hooks). Mock all external dependencies.
- Integration Tests: For API routes and database interactions. Use a test database.
- E2E Tests: (Only if requested) For full user flows (Playwright).
- Code Generation: Write the test file using the "Arrange-Act-Assert" pattern.
- Verification: Provide the exact command to run the tests.
Instructions
- Filesystem: Always co-locate tests with code (e.g.,
features/auth/login.test.tsnext tologin.ts) or use a top-level__tests__folder for integration. - Mocking:
- NEVER make real network calls in Unit Tests. Use
vi.mock()orjest.mock(). - If testing DB logic, use an in-memory DB or transaction rollbacks.
- NEVER make real network calls in Unit Tests. Use
- Coverage: Focus on "Happy Path" (it works) and "Edge Cases" (null values, errors), not 100% coverage vanity metrics.
Self-Correction Checklist
- "Did I mock the database call?" -> Yes, unless it's an integration test.
- "Did I test for empty input?" -> Yes, always test edge cases.
Score
Total Score
40/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