Chapter 7: "There’s no code for you to write in this chapter" (page 168)

Right, I see how that’s confusing! Some of the tests in the book, such as that initial one, are meant as demonstrations of tests - you can write them, and they will pass, but we haven’t included them in the app. This chapter is more illustrative, meant to show possibilities that you can apply when you need them.

As we state later on (perhaps way too late) - realistically, we wouldn’t write all of the tests that we demonstrate, because Tunez isn’t complex enough to need them. The generator we write is “real”, as are the interface tests and some of the policy tests, but in reality most of our “real” tests cover action calls, the search UI, and policies, and aren’t super interesting! Once you’ve seen one, you’ve got an idea of how the rest work.

I’ll have a think how this can be improved for the next beta. I think the approach in the Tunez app is correct (don’t fill it full of tests for the sake of tests) but the description in the book needs to be clearer…

1 Like