spyOn explicitly checks to see that a method name to spy on was passed.
[finish #27689237]
This commit is contained in:
@@ -9,6 +9,10 @@ getJasmineRequireObj().SpyRegistry = function(j$) {
|
||||
throw new Error('spyOn could not find an object to spy upon for ' + methodName + '()');
|
||||
}
|
||||
|
||||
if (j$.util.isUndefined(methodName)) {
|
||||
throw new Error('No method name supplied');
|
||||
}
|
||||
|
||||
if (j$.util.isUndefined(obj[methodName])) {
|
||||
throw new Error(methodName + '() method does not exist');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user