Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
mocha-reporter
Advanced tools
Mocha reporter, enhanced.
Capture stdout and stderr, and pretty-prints it only on error or when the DEBUG environment variable is set (like in the example above). This allows you to still leverage logging within your tests, or even add test-specific logs.
Thrown or returned errors will look much prettier now.
It looks even better when combined with espower-loader!
npm install --save mocha-reporter
Optionally, you may also add the following at the entrypoint of your test suite (it needs to be placed before any other Mocha-related calls):
require('mocha-reporter').hook()
This will add an extra line containing the file name and line number of the test upon error:
Finally, you may also set the DEBUG
environment
to true
to view the log output of all tests, including
the ones that passed.
DEBUG=true npm run test
Under package.json
:
{
"scripts": {
"test:unit": "mocha --reporter mocha-reporter"
}
}
MIT
FAQs
Mocha reporter, enhanced
The npm package mocha-reporter receives a total of 105 weekly downloads. As such, mocha-reporter popularity was classified as not popular.
We found that mocha-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.