Custom Assertions
function isAwesome( required expected ){
return ( arguments.expected == "TestBox" ? fail( 'TestBox is always awesome' ) : true );
}Assertion Registration
Inline Assertions
function beforeTests(){
addAssertions({
isAwesome = function( required expected ){
return ( arguments.expected == "TestBox" ? true : fail( 'not TestBox' ) );
},
isNotAwesome = function( required expected ){
return ( arguments.expected == "TestBox" ? fail( 'TestBox is always awesome' ) : true );
}
});
}Class Assertions
Was this helpful?