Throw an Error rather than a string when createSpyObj is called incorectly
This commit is contained in:
@@ -54,7 +54,9 @@ getJasmineRequireObj().SpyFactory = function(j$) {
|
||||
}
|
||||
|
||||
if (methods.length === 0 && properties.length === 0) {
|
||||
throw 'createSpyObj requires a non-empty array or object of method names to create spies for';
|
||||
throw new Error(
|
||||
'createSpyObj requires a non-empty array or object of method names to create spies for'
|
||||
);
|
||||
}
|
||||
|
||||
return obj;
|
||||
|
||||
Reference in New Issue
Block a user