Another exercise block covered!
I hope I was successful in infecting you with my love toward assertions. You can use assertions to a great effect to elevate your test experience and make tests more useful.
Now you know how to extend the
expect()
with your custom matchers, teach Vitest to compare the uncomparable, and use built-in APIs for soft and retyable assertions.These are exactly the things that make good tests great.
But no matter how great your tests are, they lose a lot of value if they are slow 😬. Which brings me to the next exercise block... But before we continue, let's refresh and rest a bit! You want to be at your best because we are going to dissect test performance!