Loadingโฆ
Loadingโฆ
When every existing test exercises the happy path.
Write tests for the failure behaviour of the code below. Cover: 1. Every external call failing: timeout, connection refused, 500, malformed response, slow response that eventually succeeds. 2. Invalid input at each entry point, including input that is valid in type but impossible in meaning. 3. Partial failure: the operation half completed. Assert the state we are left in. 4. Failure during cleanup or rollback. 5. Repeated failure, to check for retry storms or unbounded growth. For each, assert three things: the caller sees a useful error, no data is corrupted, and the system can carry on. Point out any error path that is currently unreachable, and any catch block that swallows the cause. Code:
Finding coverage gaps. Working out which behaviours, edge cases and error paths nothing currently checks.
Promptory saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.
Add to your browser โ free