Apply prettier
This commit is contained in:
@@ -210,9 +210,13 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
|
||||
this.setDefaultSpyStrategy = function(defaultStrategyFn) {
|
||||
if (!currentRunnable()) {
|
||||
throw new Error('Default spy strategy must be set in a before function or a spec');
|
||||
throw new Error(
|
||||
'Default spy strategy must be set in a before function or a spec'
|
||||
);
|
||||
}
|
||||
runnableResources[currentRunnable().id].defaultStrategyFn = defaultStrategyFn;
|
||||
runnableResources[
|
||||
currentRunnable().id
|
||||
].defaultStrategyFn = defaultStrategyFn;
|
||||
};
|
||||
|
||||
this.addSpyStrategy = function(name, fn) {
|
||||
@@ -304,7 +308,8 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
resources.customMatchers = j$.util.clone(
|
||||
runnableResources[parentRunnableId].customMatchers
|
||||
);
|
||||
resources.defaultStrategyFn = runnableResources[parentRunnableId].defaultStrategyFn;
|
||||
resources.defaultStrategyFn =
|
||||
runnableResources[parentRunnableId].defaultStrategyFn;
|
||||
}
|
||||
|
||||
runnableResources[id] = resources;
|
||||
|
||||
@@ -12,7 +12,13 @@ getJasmineRequireObj().Spy = function(j$) {
|
||||
* @constructor
|
||||
* @name Spy
|
||||
*/
|
||||
function Spy(name, originalFn, customStrategies, defaultStrategyFn, getPromise) {
|
||||
function Spy(
|
||||
name,
|
||||
originalFn,
|
||||
customStrategies,
|
||||
defaultStrategyFn,
|
||||
getPromise
|
||||
) {
|
||||
var numArgs = typeof originalFn === 'function' ? originalFn.length : 0,
|
||||
wrapper = makeFunc(numArgs, function() {
|
||||
return spy.apply(this, Array.prototype.slice.call(arguments));
|
||||
|
||||
@@ -3,7 +3,13 @@ getJasmineRequireObj().SpyFactory = function(j$) {
|
||||
var self = this;
|
||||
|
||||
this.createSpy = function(name, originalFn) {
|
||||
return j$.Spy(name, originalFn, getCustomStrategies(), getDefaultStrategyFn(), getPromise);
|
||||
return j$.Spy(
|
||||
name,
|
||||
originalFn,
|
||||
getCustomStrategies(),
|
||||
getDefaultStrategyFn(),
|
||||
getPromise
|
||||
);
|
||||
};
|
||||
|
||||
this.createSpyObj = function(baseName, methodNames) {
|
||||
|
||||
Reference in New Issue
Block a user