Agent skill
test-organization
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/test-organization
SKILL.md
Test Organization Skill
Purpose
Test file structure and naming conventions for the music-app project.
File Structure
src/
├── components/
│ ├── NavBar.jsx
│ └── __tests__/
│ └── NavBar.test.jsx
├── services/
│ ├── tunesService.js
│ └── __tests__/
│ └── tunesService.test.js
Naming Conventions
- Component tests:
ComponentName.test.jsx - Service tests:
serviceName.test.js - Test directory:
__tests__/adjacent to source
Test Structure
describe('ComponentName', () => {
beforeEach(() => {
jest.clearAllMocks();
});
describe('feature group', () => {
test('specific behavior', () => {
// Arrange
// Act
// Assert
});
});
});
Best Practices
✅ Group related tests with describe ✅ Clear, descriptive test names ✅ One assertion per test (usually) ✅ Clean up in beforeEach/afterEach ❌ Don't skip tests without reason ❌ Don't test implementation details
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?