Writing Our Next Tests for Wordz

Learn how to incrementally add tests in Wordz for a single correct letter and engage in refactoring for clarity, readability, and simplification.

So, what should we write for our next tests? What would be a useful and small enough step so that we don’t fall into the trap of writing beyond what our tests can support? In this lesson, we’ll continue building out the Wordz application scoring system using TDD. We’ll discuss how we choose to move forward at each step. For the next test, a good choice is to play it safe and move only a small step further.

We’ll add a test for a single correct letter. This will drive out our first piece of genuine application logic.

Writing a failing test for a single correct letter

Let’s start with red and write a failing test for a single correct letter.

Get hands-on with 1200+ tech skills courses.