Allow users to set a default spy strategy

This commit is contained in:
Elliot Nelson
2019-06-02 09:05:45 -04:00
parent 0644731680
commit 96786c793f
5 changed files with 110 additions and 4 deletions

View File

@@ -1,9 +1,9 @@
getJasmineRequireObj().SpyFactory = function(j$) {
function SpyFactory(getCustomStrategies, getPromise) {
function SpyFactory(getCustomStrategies, getDefaultStrategyFn, getPromise) {
var self = this;
this.createSpy = function(name, originalFn) {
return j$.Spy(name, originalFn, getCustomStrategies(), getPromise);
return j$.Spy(name, originalFn, getCustomStrategies(), getDefaultStrategyFn(), getPromise);
};
this.createSpyObj = function(baseName, methodNames) {