When first learning about mocks and isolation, it's tempting to overdo it, and I did. We'll look at a test that I wrote several years ago and examine its obsession with mocking. As we do that, we'll refactor it to be simpler, more direct, and with less indirection via mocks.
Execute Program
Looking for something more interactive? Try Execute Program, an interactive learning platform from Destroy All Software LLC! It has courses on TypeScript, SQL, regular expressions, JavaScript concurrency, and more. All Destroy All Software subscriptions include full access to Execute Program, or you can subscribe to Execute Program directly.