Moved createSpyObj to env so it can be stateful

This commit is contained in:
Steve Gravrock
2018-01-09 09:53:45 -08:00
parent 16e07a0e99
commit 298b5ba127
5 changed files with 102 additions and 88 deletions

View File

@@ -256,5 +256,17 @@ getJasmineRequireObj().interface = function(jasmine, env) {
return env.clock;
};
/**
* Create an object with multiple {@link Spy}s as its members.
* @name jasmine.createSpyObj
* @function
* @param {String} [baseName] - Base name for the spies in the object.
* @param {String[]|Object} methodNames - Array of method names to create spies for, or Object whose keys will be method names and values the {@link Spy#and#returnValue|returnValue}.
* @return {Object}
*/
jasmine.createSpyObj = function(baseName, methodNames) {
return env.createSpyObj(baseName, methodNames);
};
return jasmineInterface;
};