hath-assert
v0.2.0
Published
A set of hath assertions
Downloads
6
Readme
hath-asserts
A set of assertion helpers for hath. PRs welcome.
API
- require('hath-assert')([<Hath>])
- t.assertEquals(<any>, <any>, [<message>])
- t.assertNotEquals(<any>, <any>, [<message>])
- t.assertMatches(<RegExp>, <any>, [<message>])
- t.assertNotMatches(<RegExp>, <any>, [<message>])
- t.assertTruthy(<any>, [<message>])
- t.assertFalsey(<any>, [<message>])
- t.assertError(<any>, [<message>])
- t.assertThrows(<function>, [<RegExp>])
Example
const Hath = require('hath-assert')()
function testFoo(t, done) {
t.assertEquals(1, 1)
done()
}
module.exports = Hath.suite('Hath Assert Example', [
testFoo
]);
if (module === require.main) {
module.exports(new Hath());
}