Works exactly like sinon.mock
Works exactly like sinon.spy
Works exactly like sinon.stub.
Creates a new object with the given functions as the prototype and stubs all implemented functions.
Type being stubbed.
Object or class to stub.
An optional map overriding created stubs
A stubbed version of the constructor.
Replaces property on object with replacement argument. Attempts to replace an already replaced value cause an exception. replacement can be any value, including spies, stubs and fakes. This method only works on non-accessor properties, for replacing accessors, use sandbox.replaceGetter() and sandbox.replaceSetter().
Replaces getter for property on object with replacement argument. Attempts to replace an already replaced getter cause an exception. replacement must be a Function, and can be instances of spies, stubs and fakes.
Replaces getter for property on object with replacement argument. Attempts to replace an already replaced getter cause an exception. replacement must be a Function, and can be instances of spies, stubs and fakes.
Replaces setter for property on object with replacement argument. Attempts to replace an already replaced setter cause an exception. replacement must be a Function, and can be instances of spies, stubs and fakes.
Replaces setter for property on object with replacement argument. Attempts to replace an already replaced setter cause an exception. replacement must be a Function, and can be instances of spies, stubs and fakes.
Resets the internal state of all fakes created through sandbox.
Resets the behaviour of all stubs created through the sandbox. Since sinon@2.0.0
Resets the history of all stubs created through the sandbox. Since sinon@2.0.0
Restores all fakes created through sandbox.
Fakes XHR and binds a server object to the sandbox such that it too is restored when calling sandbox.restore(). Access requests through sandbox.requests and server through sandbox.server
Causes Sinon to replace the native XMLHttpRequest object in browsers that support it with a custom implementation which does not send actual requests. In browsers that support ActiveXObject, this constructor is replaced, and fake objects are returned for XMLHTTP progIds. Other progIds, such as XMLDOM are left untouched. The native XMLHttpRequest object will be available at sinon.xhr.XMLHttpRequest
Causes all stubs created from the sandbox to return promises using a specific Promise library instead of the global one when using stub.rejects or stub.resolves. Returns the stub to allow chaining. Since sinon@2.0.0
Verifies all mocks created through the sandbox.
Verifies all mocks and restores all fakes created through the sandbox.
A convenience reference for sinon.assert Since sinon@2.0.0