Test doubles are fake objects that replace actual dependencies in our tests. Why would you want to use a mocking library? Some of the benefits of using a library such as Sinon include the following:
In this section, we create and use stubs in our tests.
A stub is a fake object that provides stand-in functionality of an external dependency of our object ...