Definitions and unit tests for sinon.js