Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.calledWithMatch('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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.