sinon.js

JavaScript test spies, stubs and mocks.

utilitypopularspiesstubsmocktesting

http://sinonjs.org/