testing

SKILL.md

Testing Best Practices

Test Structure (AAA Pattern)

  • Arrange: Set up test data and conditions
  • Act: Execute the code under test
  • Assert: Verify the expected outcome
  • Use descriptive test names: "should X when Y"

Unit Tests

  • Test one behavior per test
  • Mock external dependencies
  • Test edge cases and error paths
  • Keep tests fast (< 100ms each)
  • Use factories for test data
  • Aim for 80%+ coverage
Installs
1
First Seen
Apr 10, 2026