Sinon.JS – Standalone test fakes, spies, stubs and mocks for JavaScript. Works with any unit testing framework.