tiny tap test thing
A very very small tap-emitting test framework.
This is not a test runner, but you can use tap as your test runner. Because tt outputs TAP formatted results, it'll get interpreted nicely.
Do this in your test script:
var test = require'tt'test'first test'tequal2 1 + 1 'math works'tequal0.3 0.1 + 0.1 + 0.1 'except when it doesnt'ttest'child test'tpass'this will always pass'tfail'this will never pass'tendtendtest'second test'toktrue 'etc'tend
Run it with
node my-test.js, or your favorite TAP-aware test runner
The function exported by
require('tt') is the test function. Give
it a name and a function. That function will get an argument object
which has some assertion methods.
Every function from
require('assert') are supported, but they output
TAP data rather than throwing.
Also, you have