Getting better feedback from sinon stubs
Sinon is an extremely powerful tools for writting unit tests. It helps to create standalone spies, stubs and mocks to isolate functionallity.
Setting up Sinon
The documentation suggests you can, for example, create a spy like so:
it('calls the original function', function () { var callback = sinon.spy(); var proxy = once …