One of the signs of a “good” test is that when it fails, it very quickly pinpoints to you why it failed so that you can get to fixing the problem quickly.
To that end, our current expectation errors are not as helpful as they could be. In Chapter 5, you saw how matchers are used to output “pretty” expectation failure messages. However, when a failure occurs, we’ll also get an exception stack trace printout, and it’s this that we can improve on.
In this chapter, we’ll take the stack trace and rework it into something ...