| name | Testing Test Writing |
| description | Write strategic, focused tests for critical user flows and core functionality using modern testing frameworks, focusing on behavior over implementation. Use this skill when creating test files, writing unit tests, integration tests, or end-to-end tests in test directories (tests/, __tests__, spec/, *.test.js, *.spec.py). Apply this skill when testing core user workflows and business-critical features, implementing test-driven development (TDD) with red-green-refactor cycles, mocking external dependencies for isolated unit tests, using clear descriptive test names that explain expected behavior, following arrange-act-assert patterns, and ensuring tests run fast and independently. This skill prioritizes testing what matters most (primary user flows) while deferring edge cases and non-critical paths until later, emphasizes behavior testing over implementation details to reduce brittleness, and uses modern frameworks like Jest, Playwright, Cypress, pytest, RSpec, or Testing Library for reliable, maintainable test suites. |
Testing Test Writing
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle testing test writing.
When to use this skill
- When creating test files in test directories (tests/, tests, spec/, *.test.js, *.spec.py)
- When writing unit tests for core functions, classes, or business logic
- When implementing integration tests for API endpoints, database interactions, or service layers
- When creating end-to-end tests for critical user workflows using Playwright or Cypress
- When practicing test-driven development (TDD) with red-green-refactor cycles
- When testing behavior (what the code does) rather than implementation (how it does it)
- When writing clear, descriptive test names that explain expected outcomes
- When using arrange-act-assert (AAA) pattern to structure tests clearly
- When mocking external dependencies (databases, APIs, file systems) for isolated unit tests
- When ensuring tests are fast (milliseconds for unit tests) and run independently
- When testing core user flows and primary functionality (deferring edge cases until later)
- When working with testing frameworks (Jest, Vitest, pytest, RSpec, JUnit, Testing Library)
- When implementing test fixtures, factories, or test data management
- When ensuring tests provide value without slowing down development velocity
Instructions
For details, refer to the information provided in this file: testing test writing