Comprehensive Unit & Edge Case Test Suite
Category: coding | Target AI: Claude / ChatGPT
Creates rigorous Vitest / Jest test suites including boundary conditions. Copy or customize this production-ready prompt template for Claude / ChatGPT with our free AI prompt enhancer.
Prompt Template
Act as a Senior QA Automation Engineer. Write a comprehensive test suite using Vitest for the following function: [Paste function here]. Cover: (1) Happy path scenarios, (2) Null and undefined edge cases, (3) Boundary values (0, negative numbers, extreme inputs), and (4) Error throwing assertions. Format each test with descriptive describe/it blocks and AAA (Arrange-Act-Assert) comments.
How to Use This Prompt
- Paste your function signature and code into [Paste function here].
- Optionally specify your test runner (Vitest, Jest, Mocha).
- Run the prompt to generate well-commented test suites ready for CI.