micro-should
Ultra-simple testing framework without dependencies. Supports async cases.
Works with any assertion library.
npm install micro-should
Usage
const {should} = require("micro-should");
const assert = require("assert");
should("add two numbers together", () => {
assert.equal(2 + 2, 4);
});
should("catch errors", () => {
assert.throws(() => { throw new Error("invalid"); });
});
should("produce correct promise result", async () => {
const fs = require("fs").promises;
const data = await fs.readFile("README.md", "utf-8");
assert.ok(data.includes("Minimal testing"));
});
should.run();
License
MIT (c) Paul Miller (https://paulmillr.com), see LICENSE file.