Class gabarito.TestBuilder
Class defined in:lib/gabarito.js:722
The test builder is a helper that builds a test in a more expressive way.
Usage:
gabarito.test().
name("test name").
before(function () {
// runs before each clause
}).
after(function () {
// runs after each clause
}).
clause("an unimplemented clause").
clause("another clause", function () {
// clause body
});
Index
Methods
gabarito.TestBuilder
after( after )
lib/gabarito.js:786
Sets the after function within the test object.
Parameters:-
after<Function>
Returns: <gabarito.TestBuilder>
gabarito.TestBuilder
before( before )
lib/gabarito.js:772
Sets the before function within the test object.
Parameters:-
before<Function>
Returns: <gabarito.TestBuilder>
gabarito.TestBuilder
clause( name, [body] )
lib/gabarito.js:754
Adds a clause within the test object.
If the clause body is omitted, an unimplemented clause that always throws an error will be used instead.
Parameters:-
name<String> -
[body]<Function>
Returns: <gabarito.TestBuilder>
gabarito.TestBuilder
name( name )
lib/gabarito.js:800
Sets test name for the test object.
Parameters:-
name<String>
Returns: <gabarito.TestBuilder>