
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
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.

Security News
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.