Testing Patterns

Plan, write, and maintain automated tests in any language, with worked examples in Python and JavaScript/TypeScript. Use this skill whenever the user wants to write or plan tests, apply TDD (red-green-refactor), structure unit tests with arrange-act-assert and given-when-then naming, choose between fakes, stubs, and mocks, set up dependency injection for testability, build integration tests with testcontainers, database seeding, or transaction rollback, write Playwright or Cypress end-to-end tests, use property-based testing with Hypothesis or fast-check, create pytest fixtures or factory_boy factories, review coverage or mutation testing, or triage flaky tests in CI. Also trigger for "test pyramid", "test trophy", "test isolation", "mocking", "snapshot tests", "golden files", "parametrized tests", "make the tests pass".

svngoku 4b52448 10 files · 44.7 KB Updated

File contents

svngoku/coding-agents-skills/tree/main/skills/testing-patterns commit 4b52448954

Frequently asked questions

npx skillmds@latest add svngoku/testing-patterns