Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fatso83/mini-mocha

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fatso83/mini-mocha - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

package.json
{
"name": "@fatso83/mini-mocha",
"version": "2.1.0",
"version": "2.1.1",
"description": "A minimal emulation of Mocha",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,3 +5,3 @@ # mini-mocha

## Why
This was hacked together very quickly for demo purposes, making it possible to verify bugs on the Sinon issue tracker
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](https://runkit.com/fatso83/sinon-test-issue-101) 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!

@@ -15,21 +15,21 @@

describe("issue #101 ES5 version", function() {
it("shows a normal sync test", function() {
// passes
});
it("shows a normal sync test", function() {
// passes
});
it("will fail", function() {
throw new Error("My error");
});
it("will fail", function() {
throw new Error("My error");
});
it("shows a normal async test using callbacks", function(done) {
setTimeout(() => {
done();
it("shows a normal async test using callbacks", function(done) {
setTimeout(() => {
done();
});
});
});
it("will fail async", function(done) {
setTimeout(() => {
done(new Error("My error"));
it("will fail async", function(done) {
setTimeout(() => {
done(new Error("My error"));
});
});
});
});

@@ -40,3 +40,3 @@ ```

```
$ node demo.js
$ node demo.js

@@ -50,3 +50,3 @@ issue #101 ES5 version

async/await (aka Promises) feature
✔️ should passe as expected
✔️ should pass as expected
❌ should fail (Failed with: "Some wrong type")

@@ -53,0 +53,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc