Stay up to dates with our latest activities and progress.
We are running a fundraiser to produce better documentation for Sinon, making it easier to use for everyone.

Please see details on the gofundme page.

Thank you 🙇‍♂️

/Morgan and the Sinon maintainers

Published on January 22, 2020 by Morgan Roderick
If you're a Sinon user, you may be interested in referee-sinon, which bundles Sinon and Referee in one package, so you only need a single dependency. It ships with additional assertions for Sinon fakes, like assert.calledOnceWith(stub, 1, 2) or refute.called(spy).

With this latest major release, it includes the latest Sinon (7.2) and Referee (3.1) versions. A highlight is the unified match interface which now let's you use any of the Sinon matchers in assert.equals and refute.equals.

You can import all the tools you need with a single destructuring assignment like this:

const { assert, refute, match, sinon } = require("@sinonjs/referee-sinon");

Give it a try and star the project on GitHub.

Published on December 17, 2018 by Maximilian Antoni
With the latest releases, the Sinon matchers are now shared through @sinonjs/samsam and can be used in @sinonjs/referee as well. Matchers allow you to be more fuzzy about the expected value.
const { assert, match } = require("@sinonjs/referee");

it("passes", function() {
    const object = { foo: 1, bar: "test" };

    assert.equals(object, {
        foo: 1,
        bar: match.string

You can also write your own matchers for even more expressive assertions. Read the matcher API to learn more.

Published on December 10, 2018 by Maximilian Antoni
This morning we have released v.5.0.1, new major version, to npm.

It contains a few notable changes and a new feature:

  • sinon object is now a (default) sandbox, making your setup easier
  • sinon.fake creates immutable fakes, lots easier to use than stub
  • sinon.replace, sinon.replaceGetter, sinon.replaceSetter can be used for replacing properties with fakes (and spies and stubs)


Published on April 30, 2018 by Morgan Roderick