assume-sinon
Extends assume with assertions against the Sinon.JS unit-test mocking framework.
The following flags are added:
always
The following new methods are introduced:
spylike
Assert if the value is spy.
is;
called
Assert that the function called x amount of times.
is;
calledWithNew
Assert that the function called with new
.
is;isalways;
calledBefore
Assert that the function called before a given sinon spy.
is;
calledAfter
Assert that the function called after a given sinon spy.
is;
calledOn
Assert that the function called on a given object.
is;
calledWith
Assert that the function called with the given arguments.
is;
calledWithMatch
Assert that the function called with matching arguments.
is;
calledWithExactly
Assert that the function called with matching arguments.
is;
returned
Assert that the function has returned a given value.
has;
thrown
Assert that the function has thrown.
;
License
MIT