Forces TDD discipline — writes tests before implementation, catches edge cases you'd miss.
I want to write code using Test-Driven Development. Given this function requirement: [DESCRIBE WHAT THE FUNCTION SHOULD DO] Please: 1. Write comprehensive test cases FIRST (before any implementation) 2. Include: happy path, edge cases, error cases, boundary values 3. Use [Jest/Vitest/Pytest — specify your framework] 4. After writing tests, write the minimal implementation that makes all tests pass 5. Then refactor the implementation for clarity while keeping tests green Show the tests and implementation separately.