Skip to main content


How to write unit tests using Sinon.js: spies, stubs and mocks

In this video, Marina Hoashi gives an overview of the Sinon.js library and how it can be a great tool for creating unit tests. She provides a brief overview of what test doubles such as spies, stubs, and mocks are and why they are used along with short code examples for each. In addition, she gives some tips on best practices with Sinon.js and advice on when to use each type of test double.

Project Members: Marina Hoashi