Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including minitestwrap with all npm packages installed. Try it out:

var minitestwrap = require("minitestwrap")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

minitestwrap v0.1.1

A tiny wrapper around Node's assert library


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:

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free