Change andThrow to always throw an Error
If an error is passed in, it is thrown, otherwise the argument passed in is wrapped in an Error [finishes #50607615][closes #372]
This commit is contained in:
@@ -29,8 +29,9 @@ getJasmineRequireObj().SpyStrategy = function() {
|
||||
};
|
||||
|
||||
this.callThrow = function(something) {
|
||||
var error = (something instanceof Error) ? something : new Error(something);
|
||||
plan = function() {
|
||||
throw something;
|
||||
throw error;
|
||||
};
|
||||
return getSpy();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user