Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
assume-sinon
Advanced tools
Extends assume with assertions against the Sinon.JS unit-test mocking framework.
The following flags are added:
always
The following new methods are introduced:
Assert if the value is spy.
assume(spy).is.spylike();
Assert that the function called x amount of times.
assume(spy).is.called(20);
Assert that the function called with new
.
assume(spy).is.calledWithNew();
assume(spy).is.always.calledWithNew();
Assert that the function called before a given sinon spy.
assume(spy).is.calledBefore(otherspy);
Assert that the function called after a given sinon spy.
assume(spy).is.calledAfter(otherspy);
Assert that the function called on a given object.
assume(spy).is.calledOn(thisvalue);
Assert that the function called with the given arguments.
assume(spy).is.calledWith('foo', 'bar');
Assert that the function called with matching arguments.
assume(spy).is.calledMatch('foo', 'bar');
Assert that the function called with matching arguments.
assume(spy).is.calledWithExactly('foo', 'bar');
Assert that the function has returned a given value.
assume(spy).has.returned(true);
Assert that the function has thrown.
assume(spy).thrown(new Error('and error'));
MIT
FAQs
Extends assume with assertions for the Sinon.JS mocking framework
The npm package assume-sinon receives a total of 1,091 weekly downloads. As such, assume-sinon popularity was classified as popular.
We found that assume-sinon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.