Generate integration tests for an API
Cover every API endpoint with integration tests across success, validation, and error scenarios. Mocks external services to keep tests fast and deterministic.
Preview
Copy prompt
Write integration tests for the following API endpoints: [List endpoints with method and path]. Use [Framework, e.g. Jest + Supertest] and test each endpoint for: a successful 2xx response, invalid or missing input, authentication failure, and an internal server error scenario. Mock any external services or database dependencies to keep tests fast and deterministic.
More
Testing
Prompts
