[Code Style] Run gulp fixstyle

...to apply code style settings from #142.
This commit is contained in:
Victor Woeltjen
2016-05-19 11:29:13 -07:00
parent f12b9704d9
commit fa77139077
440 changed files with 1885 additions and 1662 deletions

View File

@@ -92,4 +92,4 @@ define(
});
});
}
);
);

View File

@@ -35,11 +35,13 @@ define(
beforeEach(function () {
mockIndicator = jasmine.createSpyObj(
"indicator",
[ "getGlyph", "getText" ]
["getGlyph", "getText"]
);
testIndicatorA = {};
testIndicatorB = function () { return mockIndicator; };
testIndicatorB = function () {
return mockIndicator;
};
testIndicatorC = { template: "someTemplate" };
testIndicators = [
@@ -71,4 +73,4 @@ define(
});
});
}
);
);

View File

@@ -32,7 +32,7 @@ define(
beforeEach(function () {
mockDocument = jasmine.createSpyObj(
"$document",
[ "on", "off" ]
["on", "off"]
);
mockTimeout = jasmine.createSpy('timeout');
controller = new ClickAwayController(

View File

@@ -57,4 +57,4 @@ define(
});
});
}
);
);

View File

@@ -48,7 +48,7 @@ define(
beforeEach(function () {
mockScope = jasmine.createSpyObj(
"$scope",
[ "$apply", "$watch", "$watchCollection" ]
["$apply", "$watch", "$watchCollection"]
);
mockScope.ngModel = {};
mockScope.field = "testField";

View File

@@ -80,4 +80,4 @@ define(
});
}
);
);

View File

@@ -39,35 +39,35 @@ define(
beforeEach(function () {
mockScope = jasmine.createSpyObj(
"$scope",
[ "$watch" ]
["$watch"]
);
mockScope.ngModel = {};
mockScope.ngModel.selectedObject = 'mock selected object';
mockObjectService = jasmine.createSpyObj(
"objectService",
[ "getObjects" ]
["getObjects"]
);
mockPromise = jasmine.createSpyObj(
"promise",
[ "then" ]
["then"]
);
mockObjectService.getObjects.andReturn(mockPromise);
mockDomainObject = jasmine.createSpyObj(
"selectedObject",
[ "hasCapability", "getCapability", "useCapability", "getModel" ]
["hasCapability", "getCapability", "useCapability", "getModel"]
);
mockDomainObject.getModel.andReturn({location: 'somewhere'});
mockDomainObject.hasCapability.andReturn(true);
mockContextCapability = jasmine.createSpyObj(
"context capability",
[ "getParent" ]
["getParent"]
);
mockLocationCapability = jasmine.createSpyObj(
"location capability",
[ "isLink" ]
["isLink"]
);
mockDomainObject.getCapability.andCallFake(function (param) {
if (param === 'location') {
@@ -76,9 +76,9 @@ define(
return mockContextCapability;
}
});
controller = new ObjectInspectorController(mockScope, mockObjectService);
// Change the selected object to trigger the watch call
mockScope.ngModel.selectedObject = mockDomainObject;
});
@@ -94,17 +94,17 @@ define(
it("if link, looks for primary parent objects", function () {
mockLocationCapability.isLink.andReturn(true);
mockScope.$watch.mostRecentCall.args[1]();
expect(mockDomainObject.getModel).toHaveBeenCalled();
expect(mockObjectService.getObjects).toHaveBeenCalled();
mockPromise.then.mostRecentCall.args[0]({'somewhere': mockDomainObject});
});
it("gets metadata", function () {
mockScope.$watch.mostRecentCall.args[1]();
expect(mockDomainObject.useCapability).toHaveBeenCalledWith('metadata');
});
});
}
);
);

View File

@@ -43,7 +43,7 @@ define(
function makeMockObject(id) {
var mockObject = jasmine.createSpyObj(
'object-' + id,
[ 'getId' ]
['getId']
);
mockObject.getId.andReturn(id);
return mockObject;
@@ -60,15 +60,15 @@ define(
);
mockDomainObject = jasmine.createSpyObj(
'domainObject',
[ 'getCapability', 'hasCapability' ]
['getCapability', 'hasCapability']
);
mockType = jasmine.createSpyObj(
'type',
[ 'instanceOf' ]
['instanceOf']
);
mockDomainObjects = {};
[ "ROOT", "abc", "def", "xyz" ].forEach(function (id) {
["ROOT", "abc", "def", "xyz"].forEach(function (id) {
mockDomainObjects[id] = makeMockObject(id);
});
@@ -98,7 +98,7 @@ define(
});
it("watches for changes in controlled property", function () {
var testValue = [ "a", "b", 1, 2 ];
var testValue = ["a", "b", 1, 2];
// This test is sensitive to ordering of watch calls
expect(mockScope.$watchCollection.calls.length).toEqual(1);
// Make sure we're watching the correct object
@@ -131,7 +131,7 @@ define(
});
it("loads objects when the underlying list changes", function () {
var testIds = [ "abc", "def", "xyz" ];
var testIds = ["abc", "def", "xyz"];
// This test is sensitive to ordering of watch calls
expect(mockScope.$watchCollection.calls.length).toEqual(1);
// Make sure we're watching the correct object

View File

@@ -56,16 +56,16 @@ define(
beforeEach(function () {
mockScope = jasmine.createSpyObj(
"$scope",
[ "$apply", "$watch", "$watchCollection" ]
["$apply", "$watch", "$watchCollection"]
);
mockFormatService = jasmine.createSpyObj(
"formatService",
[ "getFormat" ]
["getFormat"]
);
testDefaultFormat = 'utc';
mockFormat = jasmine.createSpyObj(
"format",
[ "validate", "format", "parse" ]
["validate", "format", "parse"]
);
mockFormatService.getFormat.andReturn(mockFormat);

View File

@@ -59,4 +59,4 @@ define(
});
}
);
);

View File

@@ -32,7 +32,9 @@ define(
function TestObject(id, context) {
return {
getId: function () { return id; },
getId: function () {
return id;
},
getCapability: function (key) {
return key === 'context' ? context : undefined;
}
@@ -44,7 +46,7 @@ define(
mockTimeout = jasmine.createSpy("$timeout");
mockDomainObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability", "getModel", "useCapability" ]
["getId", "getCapability", "getModel", "useCapability"]
);
controller = new TreeNodeController(mockScope, mockTimeout);
@@ -71,7 +73,7 @@ define(
// This is needed to highlight the current selection
var mockContext = jasmine.createSpyObj(
"context",
[ "getParent", "getPath", "getRoot" ]
["getParent", "getPath", "getRoot"]
),
obj = new TestObject("test-object", mockContext);
@@ -92,11 +94,11 @@ define(
it("expands a node if it is on the navigation path", function () {
var mockParentContext = jasmine.createSpyObj(
"parentContext",
[ "getParent", "getPath", "getRoot" ]
["getParent", "getPath", "getRoot"]
),
mockChildContext = jasmine.createSpyObj(
"childContext",
[ "getParent", "getPath", "getRoot" ]
["getParent", "getPath", "getRoot"]
),
parent = new TestObject("parent", mockParentContext),
child = new TestObject("child", mockChildContext);
@@ -128,11 +130,11 @@ define(
it("does not expand a node if it is not on the navigation path", function () {
var mockParentContext = jasmine.createSpyObj(
"parentContext",
[ "getParent", "getPath", "getRoot" ]
["getParent", "getPath", "getRoot"]
),
mockChildContext = jasmine.createSpyObj(
"childContext",
[ "getParent", "getPath", "getRoot" ]
["getParent", "getPath", "getRoot"]
),
parent = new TestObject("parent", mockParentContext),
child = new TestObject("child", mockChildContext);
@@ -161,11 +163,11 @@ define(
it("does not expand a node if no context is available", function () {
var mockParentContext = jasmine.createSpyObj(
"parentContext",
[ "getParent", "getPath", "getRoot" ]
["getParent", "getPath", "getRoot"]
),
mockChildContext = jasmine.createSpyObj(
"childContext",
[ "getParent", "getPath", "getRoot" ]
["getParent", "getPath", "getRoot"]
),
parent = new TestObject("parent", mockParentContext),
child = new TestObject("child", undefined);

View File

@@ -33,9 +33,11 @@ define(
controller;
beforeEach(function () {
mockScope = jasmine.createSpyObj("$scope", [ "$watch" ]);
mockScope = jasmine.createSpyObj("$scope", ["$watch"]);
mockTimeout = jasmine.createSpy("$timeout");
mockTimeout.andCallFake(function (cb) { cb(); });
mockTimeout.andCallFake(function (cb) {
cb();
});
mockScope.ngModel = {};
controller = new ViewSwitcherController(mockScope, mockTimeout);
});
@@ -108,4 +110,4 @@ define(
});
}
);
);