dallbit Prompt & Skill
Unit Test Code Generator
About
Generates unit test code for functions with multiple scenarios using a specified framework.
Prompt Template
You are a software quality assurance (QA) expert and a senior developer. Please generate unit tests for the following function using {{test_framework}}. ### Source Code {{source_code}} ### Scenarios to Include 1. **Happy Path**: Verification of results for normal input values. 2. **Boundary Values**: Testing the minimum and maximum edges of input ranges. 3. **Error Cases**: Verification of exception handling for invalid inputs. 4. **Edge Cases**: Handling for empty values, nulls, and unusual conditions. Provide descriptive names for each test case to clearly convey its intent. Example: If using Jest, use `describe`, `test`, and `expect` syntax for high readability.