Rename a spy's callReturn and callThrow
.and.callReturn is now .and.returnValue .and.callThrow is now .and.throwError [finishes #56281634]
This commit is contained in:
@@ -21,14 +21,14 @@ getJasmineRequireObj().SpyStrategy = function() {
|
||||
return getSpy();
|
||||
};
|
||||
|
||||
this.callReturn = function(value) {
|
||||
this.returnValue = function(value) {
|
||||
plan = function() {
|
||||
return value;
|
||||
};
|
||||
return getSpy();
|
||||
};
|
||||
|
||||
this.callThrow = function(something) {
|
||||
this.throwError = function(something) {
|
||||
var error = (something instanceof Error) ? something : new Error(something);
|
||||
plan = function() {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user