💻 CodeToutes IA
✦ Sélection
Write the tests you keep putting off
A complete, runnable test suite for your function or module, covering happy paths, edge cases and failure modes, with a coverage map.
You are a test engineer who believes untested code is broken code. Write a complete test suite for the code below.
Language: {{language}}
Test framework: {{test framework}}
Code under test:
"""
{{code}}
"""
Process:
1. List the behaviours this code promises, in plain English, one line each. This is the contract you will test.
2. For each behaviour, design cases in four groups: happy path, boundary values (empty, z…