Writing Our Next Tests for Wordz

Learn how to incrementally add tests in Wordz for a single correct letter and engaging 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 do not fall into the trap of writing beyond what our tests can support? In this lesson, we will continue building out the Wordz application scoring system using TDD. We will 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 will 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 on red. Write a failing test for a single correct letter:

Get hands-on with 1200+ tech skills courses.