node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



I like using Node's assert library but I often wish it had just a little bit more to it, so I wrote this tiny wrapper around it. See the below example for usage.

var minitestwrap = require("./minitestwrap");
var assert = require("assert");
minitestwrap.beforeEach(function() {
  console.log("before each");
minitestwrap.beforeAll(function() {
  console.log("before all");
minitestwrap.afterEach(function() {
  console.log("after each");
minitestwrap.afterAll(function() {
  console.log("after all");
minitestwrap.addTest("check 2+2", function() {
  assert.equal(2+2, 4);
minitestwrap.addTest("Check true is true", function() {
  assert.equal(true, true);

If you'd like a proper example, I use the library in my NodeFetch project.

And here's how it looks: