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.
jasmine-diff-matchers
Advanced tools
Custom Jasmine matcher library to see a more useful diff view in the reporter output.
Custom Jasmine 2.x matchers for seeing a more useful output when comparing Strings.
For example you may want to compare files, seeing the output from expect(expected).toBe(result)
only outputs the entire comparison with no hint to any deletions, additions and what is the same.
Using the diff the result of the diff matchers will be colored like your regular vcs tooling.
See the examples in the ./example/*
folder. Using the matchers requires you to add them using
the Jasmine addMatchers()
api in a beforeEach
block, Example.
beforeEach(function () {
jasmine.addMatchers(require('jasmine-diff-matchers').diffChars);
});
Now the custom matchers are added to the Jasmine api just like any other core matcher:
it('should display the same quote from Carl Sagan.', function () {
expect('pale blue dot').diffChars('pale yellow dot');
});
You can change the default deletionsColor, addedColor and sameColor with the config:
require('../config').addedColor = 'blue';
FAQs
Custom Jasmine matcher library to see a more useful diff view in the reporter output.
The npm package jasmine-diff-matchers receives a total of 8 weekly downloads. As such, jasmine-diff-matchers popularity was classified as not popular.
We found that jasmine-diff-matchers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.