Apply prettier

This commit is contained in:
Elliot Nelson
2019-06-07 23:33:06 -04:00
parent 96786c793f
commit e07da96354
3 changed files with 22 additions and 5 deletions

View File

@@ -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;

View File

@@ -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));

View File

@@ -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) {