Improve errors with the domaine and how to use the API
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
getJasmineRequireObj().toThrow = function(j$) {
|
||||
|
||||
var getErrorMsg = j$.formatErrorMsg('<toThrow>', 'expect(function() {<expectation>}).toThrow()', 'You can match a specific exception with <toThrowError>');
|
||||
|
||||
function toThrow(util) {
|
||||
return {
|
||||
compare: function(actual, expected) {
|
||||
@@ -8,7 +10,7 @@ getJasmineRequireObj().toThrow = function(j$) {
|
||||
thrown;
|
||||
|
||||
if (typeof actual != 'function') {
|
||||
throw new Error('Actual is not a Function');
|
||||
throw new Error(getErrorMsg('Actual is not a Function'));
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user