
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
mocha-plugin-highland
Advanced tools
A mocha plugin to enable Highland stream (using highland) support.
npm install --save-dev mocha-plugin-highland
-r mocha-plugin-highland
in your mocha command line npm script in package.json
{
"scripts" : {
"test": "node node_modules/mocha/bin/_mocha -r mocha-plugin-highland",
"coverage": "node node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- -r mocha-plugin-highland"
}
}
require('should');
var fs = require('fs');
var _ = require('highland');
var readFile = _.wrapCallback(fs.readFile);
describe('sometest', function () {
it('should read file and output a collection of names', () =>
readFile('myfile.txt')
.map(toUpperCase)
.map(function (x) {
return {name: x};
})
.collect()
.tap(arr => {
arr.should.containDeep([
{ name: 'Joe' },
{ name: 'Emma' },
{ name: 'Harry' },
{ name: 'Rachel' }
]);
})
);
it('does not change classical usage', function (done) {
setTimeout(done, 2000);
console.log('All good');
});
});
The module monkey patches the Runnable.prototype.run
method of mocha
to enable the usage of Highland streams. In contrast to other npm packages, this is a plugin and extends mocha
at runtime - allowing you to use any compatible mocha version.
MIT
FAQs
Mocha plugin to enable Highland streams support
We found that mocha-plugin-highland 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.