March 2023
Intermediate to advanced
280 pages
3h 52m
English
We end the book with a look at unit testing’s most misunderstood feature, the humble test double.
In Chapter 15, “Deep Equality and Constraining Matchers,” we do the groundwork for supporting test double verifications.
In Chapter 16, “Test Doubles,” we explore the theory behind test doubles and implement a spy function, together with a matcher for verifying spy invocations.
In Chapter 17, “Module Mocks,” we finish the book with a look at how entire modules can be replaced by using a Node custom loader.
Read now
Unlock full access