Skip to content

guidesmiths/hath-assert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hath-asserts

Build Status

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());
}

About

Assertion helpers for the hath test library

Resources

Stars

Watchers

Forks

Packages

No packages published