Test-first approaches · Question 44 of 60
A developer writes a component test for a function that validates postcodes; the test fails because the function does not exist yet. What comes next in TDD?
1 answer is correct. Hard Created with AI
Show answer
Answer
- A Write just enough code to make the test pass
Explanation
In TDD the failing test is followed by the code that satisfies it; only afterwards are test and code refactored.