[Style] JSLint Compliance

This commit is contained in:
Pete Richards 2015-08-06 15:16:16 -07:00
parent ec62c27f36
commit c80e9bfa26
5 changed files with 15 additions and 15 deletions

View File

@ -93,6 +93,12 @@ define(
});
}
// Store the location of an object relative to it's parent.
function addLocationToModel(modelId, model, parent) {
model.location = parent.getId();
return model;
}
// Create a new domain object with the provided model as a
// member of the specified parent's composition
function createObject(model, parent) {
@ -119,13 +125,6 @@ define(
});
}
// Store the location of an object relative to it's parent.
function addLocationToModel(modelId, model, parent) {
model.location = parent.getId();
return model;
}
return {
/**
* Create a new domain object with the provided model, as

View File

@ -202,11 +202,12 @@ define(
});
it("stores location on new domainObjects", function () {
var model = { name: "my model" };
var objectPromise = creationService.createObject(
model,
mockParentObject
);
var model = { name: "my model" },
objectPromise = creationService.createObject(
model,
mockParentObject
);
expect(model.location).toBe('parentId');
});

View File

@ -1,8 +1,8 @@
/*global define */
define(
function () {
"use strict";
function LocationCapability(domainObject) {
this.domainObject = domainObject;

View File

@ -1,4 +1,4 @@
/*global define,describe,it,expect,beforeEach */
/*global define,describe,it,expect,beforeEach,jasmine */
define(
[

View File

@ -200,7 +200,7 @@ define(
mutationPromise.resolve();
persistencePromise.resolve();
compositionPromise.resolve([linkedObject]);
expect(whenComplete).toHaveBeenCalledWith(linkedObject)
expect(whenComplete).toHaveBeenCalledWith(linkedObject);
});
});
});