[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

@@ -40,7 +40,7 @@ define(
beforeEach(function () {
mockModelService = jasmine.createSpyObj(
"modelService",
[ "getModels" ]
["getModels"]
);
testModels = {
@@ -61,14 +61,18 @@ define(
it("provides models for any IDs which are missing", function () {
var models;
decorator.getModels(['testId', 'otherId'])
.then(function (m) { models = m; });
.then(function (m) {
models = m;
});
expect(models.otherId).toBeDefined();
});
it("does not overwrite existing models", function () {
var models;
decorator.getModels(['testId', 'otherId'])
.then(function (m) { models = m; });
.then(function (m) {
models = m;
});
expect(models.testId).toEqual({ someKey: "some value" });
});

View File

@@ -37,18 +37,20 @@ define(
aggregator;
beforeEach(function () {
mockQ = jasmine.createSpyObj("$q", [ "all" ]);
mockQ = jasmine.createSpyObj("$q", ["all"]);
mockProviders = modelList.map(function (models, i) {
var mockProvider = jasmine.createSpyObj(
"mockProvider" + i,
[ "getModels" ]
["getModels"]
);
mockProvider.getModels.andReturn(models);
return mockProvider;
});
mockQ.all.andReturn({
then: function (c) { return c(modelList); }
then: function (c) {
return c(modelList);
}
});
aggregator = new ModelAggregator(mockQ, mockProviders);
@@ -72,4 +74,4 @@ define(
});
}
);
);

View File

@@ -27,7 +27,7 @@ define(['../../src/models/ModelCacheService'], function (ModelCacheService) {
cacheService;
beforeEach(function () {
testIds = [ 'a', 'b', 'c', 'd' ];
testIds = ['a', 'b', 'c', 'd'];
testModels = testIds.reduce(function (models, id) {
models[id] = { someKey: "some value for " + id };
return models;

View File

@@ -57,7 +57,9 @@ define(
};
}
function capture(value) { captured = value; }
function capture(value) {
captured = value;
}
beforeEach(function () {

View File

@@ -55,7 +55,9 @@ define(
});
it("provides models from extension declarations", function () {
var mockPromise = { then: function () { return; } };
var mockPromise = { then: function () {
return;
} };
mockQ.when.andReturn(mockPromise);
// Verify that we got the promise as the return value
@@ -97,4 +99,4 @@ define(
});
}
);
);