JavaScript test tooling has advanced a lot in the last few years, but tooling can’t solve everything—we still have decisions to make about how to optimally set up our tests. It would be great if we could learn from experienced testers who came before us, but it can be difficult to follow writing about testing in a programming language we aren’t familiar with.
Luckily, there’s one book in particular that has a lot of language-agnostic testing wisdom to share: xUnit Test Patterns. We’ll walk through some of the “test smells” it describes and see examples of how they commonly arise in JavaScript, then we’ll apply the principles from the book to solve these problems. You’ll walk away from this session with more tools in your tool belt to solve testing problems, and clearer language to talk about the tools you already have.