Learn how to use Sinon.js in your own real-world projects
To help you master Sinon and learn how to use it in practice, I've created the Sinon in the Real-world guide.In this 47 page guide, I'll show you...
- What are test doubles and their three different types?
- My simple three step method to help you create spies and stubs with ease
- 8 best practices to help you avoid common problems
- Techniques for making the most out of Sinon's three different test double types
- Five real-life examples on how to use Sinon in different scenarios
- How to test Ajax with Sinon
- How to test Node.js HTTP with Sinon
- How to test timers with Sinon
- How to deal with Promises in tests
- How to deal with complex or nested objects in tests
- BONUS CHAPTER: How test doubles work behind the scenes - We'll implement a simple test double library so you'll never wonder how Sinon does all its "magic" again