maksimtereshin avatar

testing-test-writing

Write minimal, focused tests following KISS and YAGNI principles - test only core user flows during

by maksimtereshin|Open Source

Testing Test Writing

This Skill provides Claude Code with specific guidance on test writing best practices emphasizing KISS and YAGNI principles - minimal tests during development focused on core flows.

When to use this skill

  • When creating or modifying test files across any testing framework
  • When working with test files (.test.ts, .spec.ts, .test.js, test_*.py, *_test.go, *_spec.rb)
  • When deciding what to test during feature development
  • When writing minimal tests for core user flows and critical paths
  • When deferring edge case, error state, or validation testing until later
  • When writing clear, descriptive test names that explain intent
  • When testing behavior rather than implementation details
  • When mocking external dependencies (databases, APIs, file systems)
  • When ensuring tests run fast (milliseconds) for developer productivity
  • When using testing frameworks (Jest, Vitest, pytest, RSpec, JUnit, Mocha, Jasmine)
  • When writing component tests, unit tests, or integration tests
  • When applying YAGNI to test scope - test only what's needed now
  • When applying KISS to test simplicity - keep tests simple and focused

Instructions

For details, refer to the information provided in this file: testing test writing