Agent skill
integration-testing
Enforces project integration testing conventions for facades, server actions, and database operations using Testcontainers with real PostgreSQL.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/integration-testing-jasonpaff-head-shakers-2
SKILL.md
Integration Testing Skill
Purpose
This skill provides integration testing conventions for facades, server actions, and database operations. Integration tests use real database interactions via Testcontainers.
Activation
This skill activates when:
- Creating or modifying files in
tests/integration/ - Testing facades or business logic
- Testing server actions
- Testing database queries with real data
- Working with Testcontainers
File Patterns
tests/integration/**/*.test.tstests/integration/**/*.integration.test.ts
Workflow
- Detect integration test work (file path contains
tests/integration/) - Load
references/Integration-Testing-Conventions.md - Also load
testing-baseskill for shared conventions - Apply integration test patterns with database helpers
- Ensure proper database cleanup between tests
Key Patterns (REQUIRED)
Database Management
- Database auto-starts via global setup (Testcontainers)
- Use
getTestDb()fromtests/setup/test-db.ts - Use
resetTestDatabase()orcleanupTable()inbeforeEach - Mock
@/lib/dbto use test database
Factory Usage
- Use factories from
tests/fixtures/for test data - Create realistic test scenarios with proper relationships
- Clean up created data between tests
External Service Mocking
- Mock Sentry for breadcrumb verification
- Mock CacheService for cache behavior control
- Mock Redis client to avoid connection issues
References
references/Integration-Testing-Conventions.md- Complete integration testing conventions
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?