mirror of
https://github.com/nasa/openmct.git
synced 2024-12-25 07:41:06 +00:00
[Style] JSLint Compliance
This commit is contained in:
parent
ec62c27f36
commit
c80e9bfa26
@ -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
|
// Create a new domain object with the provided model as a
|
||||||
// member of the specified parent's composition
|
// member of the specified parent's composition
|
||||||
function createObject(model, parent) {
|
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 {
|
return {
|
||||||
/**
|
/**
|
||||||
* Create a new domain object with the provided model, as
|
* Create a new domain object with the provided model, as
|
||||||
|
@ -202,11 +202,12 @@ define(
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("stores location on new domainObjects", function () {
|
it("stores location on new domainObjects", function () {
|
||||||
var model = { name: "my model" };
|
var model = { name: "my model" },
|
||||||
var objectPromise = creationService.createObject(
|
objectPromise = creationService.createObject(
|
||||||
model,
|
model,
|
||||||
mockParentObject
|
mockParentObject
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(model.location).toBe('parentId');
|
expect(model.location).toBe('parentId');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*global define */
|
/*global define */
|
||||||
|
|
||||||
define(
|
define(
|
||||||
|
|
||||||
function () {
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
function LocationCapability(domainObject) {
|
function LocationCapability(domainObject) {
|
||||||
this.domainObject = domainObject;
|
this.domainObject = domainObject;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*global define,describe,it,expect,beforeEach */
|
/*global define,describe,it,expect,beforeEach,jasmine */
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
|
@ -200,7 +200,7 @@ define(
|
|||||||
mutationPromise.resolve();
|
mutationPromise.resolve();
|
||||||
persistencePromise.resolve();
|
persistencePromise.resolve();
|
||||||
compositionPromise.resolve([linkedObject]);
|
compositionPromise.resolve([linkedObject]);
|
||||||
expect(whenComplete).toHaveBeenCalledWith(linkedObject)
|
expect(whenComplete).toHaveBeenCalledWith(linkedObject);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user