631. Spies with Sinon and Chai (jaketrent.com)
Spies will help you verify calls to methods without actually calling them. Sinon is a library that provides spies. Chai will provide assertions appropriate to spying.Install DependenciesYou'll need 3 dependencies in dev mode for running your tests:npm install sinon chai sinon-chai --save-devNow make...