Expecting Exceptions
expect( function(){ myObj.method(); } ).toThrow( [type], [regex], [message] );
$assert.throws( function(){ myObj.method; }, [type], [regex], [message] )function testMyObj(){
expectedException( [type], [regex], [message] );
}
function testMyObj() expectedException="[type]:[regex]"{
// this function should produce an exception
}Was this helpful?