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.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications