This screencast provides a laundry list of test recommendations. Some of them have been mentioned in passing in other screencasts, but the whole group has never been presented together. First, recommendations about general test design: 1) separate unit and integration tests, and 2) use alternate constructors to simplify test object creation. Then, recommendations about using test doubles like stubs and mocks: 3) name your stubs for debugging and clarity; 4) don't stub primitives; 5) listen to test setup complexity, even if it's not immediately obvious; and 6) only stub things that you trust.

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.