Skip to content
asyrafhussin avatar

Testing Best Practices

Practical TDD and unit/integration testing guidelines with 34 TypeScript rules across seven prioritized categories.

CCM score
61 of 100
skills.sh installs
993
GitHub stars
109
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers test structure, isolation, assertions, test data, mocking, coverage, and performance for Jest and Vitest suites
  • Includes 34 rules, each with a prefixed ID such as struct-aaa-pattern, iso-independent-tests, and mock-boundaries, plus code examples
  • Enforces the Arrange-Act-Assert pattern, one logical assertion per test, and mocking only at boundaries
  • Designed for reviewing test code, improving coverage strategy, and debugging flaky or slow tests

Install

$ npx -y skills add asyrafhussin/agent-skills --skill testing-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Testing Best Practices

Unit testing, integration testing, and TDD principles for reliable, maintainable test suites. Contains 36 rules across 7 categories using TypeScript, Vitest-first with Jest equivalents.

Targets: Vitest 5.1 (Node 22.12+ or 24), MSW 3, React Testing Library 16, user-event 14. Jest users: the patterns carry over with jest.* in place of vi.*.

Metadata

  • Version: 2.1.0
  • Rule Count: 36 rules across 7 categories
  • Targets: Vitest 5.1, MSW 3, React Testing Library 16, user-event 14, Node 22.12+ or 24
  • Last Updated: November 2026
  • License: MIT

When to Apply

Reference these guidelines when:

  • Writing unit or integration tests
  • Reviewing test code quality
  • Improving test coverage strategy
  • Setting up testing infrastructure
  • Debugging flaky or slow tests

Rule Categories by Priority

Details

Repository
github.com/asyrafhussin/agent-skills
Categories
Testing & QA, Code Review & Quality
First seen
Jun 3, 2026

Questions

What does the testing-best-practices skill help with?

The testing-best-practices skill covers unit testing, integration testing, and test-driven development principles for TypeScript with Jest or Vitest. It contains 34 rules across 7 categories, including test structure, isolation, assertions, test data, mocking, coverage, and performance.

How do I write tests with testing-best-practices?

Run npx -y skills add asyrafhussin/agent-skills --skill testing-best-practices -y in a project to install it. Once installed, it triggers on requests such as write tests, review tests, testing best practices, or TDD.

Which other skills lead the Testing & QA category?

testing-best-practices sits in the Testing & QA category alongside tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. Its rules focus on AAA test structure, test isolation, and avoiding over-mocking.

More from asyrafhussin/agent-skills

All 14

Similar to Testing Best Practices

More Testing & QA