[Code Style] Run gulp fixstyle
...to apply code style settings from #142.
This commit is contained in:
@@ -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" });
|
||||
});
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -57,7 +57,9 @@ define(
|
||||
};
|
||||
}
|
||||
|
||||
function capture(value) { captured = value; }
|
||||
function capture(value) {
|
||||
captured = value;
|
||||
}
|
||||
|
||||
|
||||
beforeEach(function () {
|
||||
|
||||
@@ -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(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user