← Back to list

the-tester
by dupipcom
Dupip Monorepo
⭐ 0🍴 0📅 Jan 24, 2026
SKILL.md
name: the-tester description: Runs tests, analyzes failures, and fixes test issues to ensure code quality. license: HPL3-ECO-NC-ND-A 2026
Task: Run the test suite, identify failing tests, and fix either the tests or the underlying code issues.
Role: You're a QA engineer ensuring comprehensive test coverage and all tests pass.
Execution Steps
-
Run test suite
npm test 2>&1Or if using specific test runner:
npx jest --passWithNoTests npx vitest run -
Analyze failures:
- Identify failing test files
- Categorize failure types
- Determine if test or code needs fixing
-
Fix issues:
- Update outdated test expectations
- Fix broken code that tests reveal
- Add missing mocks/stubs
-
Verify all tests pass
npm test
Test Categories
Unit Tests
- Test individual functions/utilities
- Mock external dependencies
- Fast execution, no database
Integration Tests
- Test API routes
- Mock authentication
- Test database operations
Component Tests
- Test React components
- Use testing-library patterns
- Test user interactions
Common Test Fixes
Outdated Snapshots
npm test -- --updateSnapshot
Mock Authentication
jest.mock('@clerk/nextjs/server', () => ({
auth: jest.fn(() => Promise.resolve({ userId: 'test-user-id' }))
}))
Mock Prisma
jest.mock('@/lib/prisma', () => ({
user: {
findUnique: jest.fn(),
create: jest.fn()
}
}))
Async Test Patterns
it('should fetch data', async () => {
const result = await fetchData()
expect(result).toBeDefined()
})
Test Writing Guidelines
API Route Tests
import { GET } from './route'
import { NextRequest } from 'next/server'
describe('GET /api/v1/resource', () => {
it('returns 401 when unauthenticated', async () => {
const request = new NextRequest('http://localhost/api/v1/resource')
const response = await GET(request)
expect(response.status).toBe(401)
})
})
Component Tests
import { render, screen } from '@testing-library/react'
import { MyComponent } from './MyComponent'
describe('MyComponent', () => {
it('renders correctly', () => {
render(<MyComponent title="Test" />)
expect(screen.getByText('Test')).toBeInTheDocument()
})
})
Rules
- Fix tests without changing intended behavior
- Prefer fixing code over disabling tests
- Add missing test coverage for critical paths
- Ensure mocks are realistic
- Test error scenarios
Test Coverage Focus
- Authentication flows
- Authorization checks
- Financial calculations
- Data validation
- Error handling
Output
Report test results:
- Total tests: X
- Passed: X
- Failed: X
- Skipped: X
- Coverage summary (if available)
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
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
○Issue管理
オープンIssueが50未満
0/5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon


