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.
@fatso83/mini-mocha
Advanced tools
An absolutely minimal emulation of Mocha for demos.
This was hacked together very quickly for demo purposes, making it possible to verify bugs on the Sinon issue tracker
without having access to a development environment. Having an API emulation of Mocha makes it easier to demo bugs on RunKit when I see a verification test using Mocha or Jasmine, as I can just copy-paste the test into RunKit, add require('@fatso83/mini-mocha').install()
at the top and it will run!
require('@fatso83/mini-mocha').install();
describe("issue #101 ES5 version", function() {
it("shows a normal sync test", function() {
// passes
});
it("will fail", function() {
throw new Error("My error");
});
it("shows a normal async test using callbacks", function(done) {
setTimeout(() => {
done();
});
});
it("will fail async", function(done) {
setTimeout(() => {
done(new Error("My error"));
});
});
});
Results in this being printed
$ node demo.js
issue #101 ES5 version
✔️ shows a normal sync test
❌ will fail (Failed with: "My error")
✔️ shows a normal async test using callbacks
❌ will fail async (Failed with: "My error")
async/await (aka Promises) feature
✔️ should pass as expected
❌ should fail (Failed with: "Some wrong type")
There are bits and pieces missing from the Mocha API, but it fulfills all the basic requirements.
this.title
, this.fullTitle()
, etc.If you want to contribute, here are some tips:
npm run update-snapshots
will update the snapshots used for testing the outputFAQs
A minimal emulation of Mocha
The npm package @fatso83/mini-mocha receives a total of 0 weekly downloads. As such, @fatso83/mini-mocha popularity was classified as not popular.
We found that @fatso83/mini-mocha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.