Unit, integration, and E2E testing patterns with framework-specific guidance. Use when asked to "write tests", "add test coverage", "testing strategy", "test this function", "create test suite", "fix flaky tests", or "improve test quality".
Initial release of testing-patterns: a comprehensive guide for writing effective tests at all levels. - Introduces patterns for unit, integration, and E2E testing, including framework-specific examples. - Covers test structure styles: Arrange-Act-Assert, Given-When-Then, parameterized, property-based, and snapshot tests. - Explains test doubles (stub, mock, spy, fake) and when to use each. - Provides integration and database testing strategies, with practical examples. - Outlines mocking best practices, emphasizing boundary-based mocks and dependency injection for testability. - Includes a framework quick reference for popular test runners and assertion libraries.