flip-tape
Write eloquent tests:
'Tautology'.equals(true, true)
More specific: flip-tape
adds 'Two is less than three'.ok(2 < 3)
syntax to tape plus two further callback-executing methods. Original functionality is kept.
npm install flip-tape
Usage
var test = 'You can also start a group of assertions this way...'
All of tapes methods that print out msg
to the command-line are usable with the flipped syntax.
API
var test = require('flip-tape')
Attaches all tape-methods that print out to the command-line plus the .t()
and .test()
methods to the String prototype.
'[message]'.test([opt], cb)
, '[message]'.only([opt], cb)
Calls the respective tape
method: .test
or .only
.
'[message]'.t(cb)
A tape comment containing the message
is added. Then cb(t)
gets called with the test object t.
'[message]'.tapeTestMethodName([actual, fn], [expected])
Calls the according tape method relaying the message string and the optional parameters.
License
MIT