Skip to content
An asynchronous unit testing framework in under 40 lines of code.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
LICENSE.txt Updated documentation. Feb 24, 2012
package.json Pulled code into this library. Feb 24, 2012

Node Micro Test

MicroTest is an asynchronous testing framework built for Node.js. It's under 40 lines of code, and has no dependencies.


Create a folder called test/ in the root of your project directory.

Within this folder create .js testing files that look like this:

var equal = require('assert').equal;

exports.tests = {
    'true should be equal to true': function(finished, prefix) {
        equal(true, true, prefix + " that's weird, true should really be equal to true.");
        setTimeout(function() {
        }, 2000);
  • finished call this within your test, to indicate that all asynchronous actions have completed.
  • prefix contextual information about the test that you can print out with your assertions.


Just run the command micro-test from the root directory of your Node.js project.

  • npm install micro-test -g
  • micro-test


Copyright (c) 2012 See LICENSE.txt for further details.

Something went wrong with that request. Please try again.