Skip to main content

06.22.2017

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

Find the program that fits your life.

Learn about our coding, cybersecurity, and data analytics bootcamps offered on full-time and part-time schedules.