NestJS / Express API Endpoint Controller Integration Test Generator
Write clean backend API controller tests covering authorization, validation errors, and database edge cases using Copilot.
// Act as a QA automation engineer using GitHub Copilot inline chat.
// Write a comprehensive Jest integration test suite for the controller below.
// Requirements:
// 1. Setup mock services and databases.
// 2. Test successful requests (status 200/201).
// 3. Test validation errors (status 400 with invalid inputs).
// 4. Test authorization failure (status 401/403 with invalid tokens).
// 5. Test edge cases (not found exceptions, database crash simulations).
// Controller Code to test:
[Insert Controller Code Here]💡 How to Use This Prompt
Copy the prompt above and paste it directly into GitHub Copilot or your preferred AI model. Replace any bracketed placeholders [ ] with your specific task inputs.
Was This Helpful?
Help us improve by rating this resource.
Share This Resource
Share with your team and social networks.