@fatso83/mini-mocha
Advanced tools
Comparing version 2.1.0 to 2.1.1
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
4580
0