{"enrichment":{"faq":[{"a":"Testing Strategies explains the testing pyramid as a framework balancing test types: a broad base of fast unit tests, a middle layer of integration tests for component interaction, and a small top of E2E tests for full-system validation. This ratio ensures rapid feedback during development while maintaining comprehensive coverage. The pyramid prioritizes unit tests for speed and breadth, integration tests to verify components work together, and E2E tests using tools like Playwright to validate complete workflows.","q":"What is the testing pyramid and what are best practices?"},{"a":"Testing Strategies teaches the Arrange-Act-Assert (AAA) pattern as the foundation for unit test structure. Arrange sets up test data and mocks; Act executes the code under test; Assert verifies the outcome. This pattern, combined with Jest, creates clear, maintainable tests. Testing Strategies covers how to structure each phase, use test fixtures and factories for setup, and apply mocking to isolate units under test for reliable, focused assertions.","q":"How do you write unit tests using the Arrange-Act-Assert pattern?"},{"a":"Testing Strategies distinguishes these test isolation techniques: mocks replace dependencies and verify interactions were called correctly; stubs provide fixed responses without verification; spies wrap real functions to track calls while preserving behavior. Jest supports all three patterns. Testing Strategies shows when to use each\u2014mocks for behavior verification, stubs for simple return values, and spies for observing real function calls\u2014enabling effective test isolation and preventing flaky tests.","q":"What are the differences between mock, stub, and spy in testing?"},{"a":"Testing Strategies implements E2E testing with Playwright for full-system validation across browsers, and integration testing to verify component interaction. It covers database testing using Testcontainers for isolated, reproducible environments. Real examples show API testing with Supertest, async code testing in JavaScript, and strategies for comparing tools like Cypress vs Playwright. These workflows validate that units work together and the complete system behaves correctly.","q":"How does Testing Strategies cover E2E and integration testing workflows?"},{"a":"Testing Strategies addresses testing async JavaScript code by handling promises, callbacks, and async/await patterns in Jest. It covers waiting for async operations to complete, mocking async dependencies, and avoiding flaky tests from race conditions. The skill teaches edge case handling for async scenarios, timeout management, and using test fixtures to set up async state, ensuring reliable tests for modern JavaScript applications.","q":"What testing strategies does Testing Strategies recommend for async code?"},{"a":"Testing Strategies covers code coverage metrics to identify untested paths and guide test writing. It teaches writing testable code by designing functions with clear inputs/outputs, avoiding tight coupling, and using dependency injection for mockability. The skill emphasizes edge case testing, test-driven development (TDD) with the red-green-refactor cycle, and CI/CD automation to catch regressions early, ensuring sustainable test practices.","q":"How can you improve code coverage and write testable code?"}],"shadow_tags":["quality-assurance","test-automation","reliability-engineering","code-validation","behavior-verification","regression-prevention","continuous-testing","mock-strategies","test-isolation","coverage-metrics"],"summary_rewrite":"Testing Strategies covers the testing pyramid\u2014unit tests for speed and breadth, integration tests for component interaction, and E2E tests for full-system validation. Learn Arrange-Act-Assert structure, mocking patterns, edge case handling, and database testing with real examples using Jest, Playwright, and Testcontainers."},"files":[{"bytes":18659,"path":"software-engineering/testing-strategies/SKILL.md","sha256":"a967e4fde88f780c682d71f37733d713d379a3c77f7b8f232ea951da2a7ae2ca","url":"https://skillfed.io/files/miles990/claude-software-skills/testing-strategies/57d3aca4/SKILL.md"}],"id":"miles990/claude-software-skills/testing-strategies","links":{"html":"https://skillfed.io/miles990/claude-software-skills/testing-strategies","md":"https://skillfed.io/miles990/claude-software-skills/testing-strategies.md","repo":"https://github.com/miles990/claude-software-skills"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":5,"language":"TypeScript","last_updated":"2026-01-20","license":"MIT","name":"testing-strategies","publisher":"miles990","stars":19},"relations":{"similar":[{"id":"daffy0208/ai-dev-standards/testing-strategist"},{"id":"duck4nh/antigravity-kit/playwright-expert"},{"id":"CloudAI-X/claude-workflow-v2/designing-tests"},{"id":"Cap-go/capgo-skills/capacitor-testing"},{"id":"joneqian/claude-skills-suite/tdd-workflow"},{"id":"personamanagmentlayer/pcl/testing-expert"},{"id":"xu-xiang/everything-claude-code-zh/tdd-workflow"},{"id":"organvm/a-i--skills/tdd-workflow"},{"id":"jmsktm/claude-settings/testing-qa"},{"id":"activepieces/activepieces/playwright-e2e-testing"}]},"slug":{"owner":"miles990","repo":"claude-software-skills","skill":"testing-strategies"},"version":"57d3aca4"}
