0.0.3 • Published 11 years ago

tiny-runner v0.0.3

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

tiny-runner

A tiny test runner with async support.

drawing

Usage

$ node <filename.js>

Where filename.js registers tests in the following format:

var test = require('tiny-runner');

test('can add two numbers', function () {
	var val = add(1, 1);
	assert.equal(2, val)
});

For async tests return a Promise/A compatible promise and resolve it with an assertion callback.

test('can add two numbers via server', function () {
	var def = new Deferred();

	serverAdd(1, 1).then(function (val) {
		def.resolve(function () {
			assert.equal(2, val);	
		});
	});

	return def.promise;
});
0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago