simpleu

Simple Unit Testing Tool

simpleU 0.0.5

simpleU is a simple unit testing tool for Node.JS that has some special features:

  • Simple structure with minimum configuration
  • No dependencies
  • Oriented for Test-Driven Development
  • Uses Node.JS assert core module

Changelog

Documentation

npm install simpleu

or install globally

npm install -g simpleu
var simpleu = require('simpleu');
 
simpleu(/* tests object */);
{
    'test name 1': function (test) {
        test.ok(/* true value */);
        test.done();
    },
    'test name 2': function (test) {
        test.ok(/* another true value*/);
        test.done();
    },
    'test name 3': function (test) {
        test.equal(/* actual value, expected value, message */);
        test.done();
    }
}
simpleu /path/to/tests
var tests = {
    'test one'function (test) {
        test.params
        test.ok(true);
        test.done();
    },
    'test four'function (test) {
        setTimeout(function () {
            test.done();
        }, 500);
        test.ok(true);
 
    },
    'test five'function (test) {
        test.ok(true);
        test.done();
    },
    'test six'function (test) {
        test.ok(true);
        test.done();
    }
};
 
module.exports = {
    tests: tests
};