Agent skill
test-organization-retex73-music-app
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/test-organization-retex73-music-app
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
javascript
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
Didn't find tool you were looking for?