Thanks to your financial contributions, we are operating on an estimated annual budget of $4,423
Today's Balance
$3,717.89
Estimated Annual Budget
$4,423

Sinon 7.2.0 and Referee 3.0.0 released

Published on December 10, 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.