tess
Simple test runner.
Use
$ npm install --save-dev tess
// test.js var assert = var tess =
API
var results = tess([opts ,] suite)
opts
- (optional)
- Type:
Object|String
opts.name
- Type:
String
A label for this suite of tests. You may also pass this in in place of theopts
object.
opts.shh
- Type:
Boolean
Won't print test results to stdout.
suite
- Type:
Function
Encapsulates all of your tests.
When invoked, this function will receive a function as its first argument.
suite(function(title, fn) {})
title
- Type:
String
The name to assign to your test.
fn
- Type:
Function
The function that wraps your assertions.
results
- Type:
Array
The results of all of your tests after running them.
results[].fn
- Type:
Function
The function that was tested.
results[].success
- Type:
Boolean
Signals if the test succeeded or failed.
results[].title
- Type
String
The name of the test that was run.
results[].error
- Type:
Object
If the test failed, this contains the error object.