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.
Useful for running (and rerunning!) Mocha test suites.
Simple API. Load and play -- that's all you need to know!
npm install angelo
Angelo = require('angelo').Angelo
angelo = new Angelo()
angelo.load("/path/to/test.js")
angelo.play()
Angelo Moriondo is the inventor of the first espresso machine.
You might like Angelo if:
and
"IMO this should be done with complete process isolation, you could use
json-stream or the json reporter and exec(), plus then that keeps mocha
lighter. win-win situation :D" - TJ
And that's what Angelo does!
Mocha has an issue with re-running test suites within the same process. This is because Mocha uses a call to require
to load test files. When require
is called, however, files are cached and only loaded once. A side-effect of this reliance on require
is that tests are only ever run once.
As a workaround, you could clear the cache of loaded modules before reloading, but this isn't foolproof. Instead, Angelo does what TJ recommends -- it runs Mocha in a child process and receives results via the JSON stream reporter.
Angelo uses spawn
, instead of exec
, so that results can be streamed as they happen. Using exec
would buffer all results until all the tests were completed.
Lasly, another benefit of Angelo is the ability to run tests in parallel. Now that test execution is running in a separate child process, you can run multiple test files in parallel by creating multiple Angelo objects.
FAQs
A (rerunnable) Mocha test runner
The npm package angelo receives a total of 3 weekly downloads. As such, angelo popularity was classified as not popular.
We found that angelo 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.