API documentation - Sinon.JS - v1.17.7

This page contains the entire Sinon.JS API documentation along with brief introductions to the concepts Sinon implements.

Important: Sinon v1.x does not work with AMD/CommonJS Bundlers

Sinon.JS v1.x as source doesn’t work with AMD loaders / RequireJS / Webpack / Browserify. For that you will have to use a pre-built version.

This has been resolved in Sinon v2.x; Please don’t report this as a bug.

Stuck?

Please ask questions on the mailing list if you’re stuck.

Contribute

We really appreciate suggestions to improve the documentation so Sinon.JS can be easy to work with. Get in touch!