Created
November 11, 2013 23:20
-
-
Save mraxus/7422408 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== TEST SETUPS === | |
t.plan(x) // Expect x asserts. If less, test will timeout, if more, test fails | |
t.end() // End test if not t.plan() is used | |
t.fail('fail test with this description') | |
t.bailout("en test right here. No more to run") | |
// t.bailsOut() wraps a child test and succeeds if it calls bailout() | |
t.bailsOut(t.test("this should bailout", function (t) { | |
t.bailout("oh noes, bailing out!") | |
})) | |
=== ASSERTS === | |
t.assert = t.true = t.ok = function (trueEval, mess) | |
t.notOk = t.false function (falseEval, mess) | |
t.equal = t.equals = t.isEqual = t.is = t.strictEqual = t.strictEquals = function (actual, expected, mess) | |
t.error = function(err, mess) | |
t.pass = function(mess) | |
t.fail = function(mess) | |
t.skip = function(mess) | |
t.throws(fn, wanted, mess) | |
t.doesNotThrow(fn, mess) | |
--=-==-=-- | |
Source: | |
https://github.com/isaacs/node-tap/blob/master/lib/tap-assert.js:172 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment