api-testing
API Integration Testing
Build robust test suites for your APIs with integration, contract, and E2E tests.
Testing Pyramid for APIs
| Level | What It Tests | Speed | Isolation |
|---|---|---|---|
| Unit | Handlers, validators, utils | Fast | High |
| Integration | API + database, services | Medium | Medium |
| Contract | API shape vs OpenAPI spec | Fast | High |
| E2E | Full stack, real DB | Slow | Low |
Key Principles
- Test API behavior through HTTP requests, not internal function calls
- Use real database for integration tests (SQLite or test containers)
- Validate response shapes against OpenAPI spec with contract tests
- Isolate external services with MSW or similar mock servers
More from srstomp/pokayokay
architecture-review
Use when auditing project structure, planning refactors, improving code organization, analyzing dependencies and module boundaries, or identifying structural issues. TypeScript/JavaScript-primary with language-agnostic patterns.
293figma-plugin
Use when building Figma plugins, creating design automation tools, implementing sandbox/UI communication, or working with the Figma Plugin API for node manipulation, styles, and components.
79security-audit
Use when reviewing code security, auditing dependencies for CVEs, checking configuration or secret security, assessing authentication and authorization patterns, identifying OWASP vulnerabilities (injection, XSS, CSRF), or addressing security concerns about implementations.
47testing-strategy
Use when designing test architecture, building API test suites, validating API contracts, setting up component or E2E testing, managing test data, debugging flaky tests, reviewing coverage strategy, or organizing test files. Covers test pyramid, mocking (MSW), frontend (React Testing Library, Playwright), and CI integration.
27sdk-development
Use when building TypeScript SDKs, extracting shared code into packages, creating developer tooling libraries, designing clean API surfaces, or publishing to npm (public or private). Covers typed clients, error handling, multi-target bundling (ESM/CJS/browser).
27session-review
Use after completing work sessions to analyze agent behavior patterns, prepare session handoffs for continuity, document completed work, identify blockers, or preserve context for the next session.
26