[Build] Remove unused variables from specs

...to satisfy JSHint.
This commit is contained in:
Victor Woeltjen
2016-03-04 12:56:14 -08:00
parent e470451718
commit d6ec7e9ab8
48 changed files with 50 additions and 142 deletions

View File

@@ -147,8 +147,7 @@ define(
});
it("adds new objects to the parent's composition", function () {
var model = { someKey: "some value" },
parentModel = { composition: ["notAnyUUID"] };
var model = { someKey: "some value" };
creationService.createObject(model, mockParentObject);
// Verify that a new ID was added
@@ -199,8 +198,7 @@ define(
it("logs an error when mutaton fails", function () {
// If mutation of the parent fails, we've lost the
// created object - this is an error.
var model = { someKey: "some value" },
parentModel = { composition: ["notAnyUUID"] };
var model = { someKey: "some value" };
mockCompositionCapability.add.andReturn(mockPromise(false));

View File

@@ -30,7 +30,6 @@ define(
describe("The navigate action", function () {
var mockNavigationService,
mockQ,
actionContext,
mockDomainObject,
action;

View File

@@ -28,7 +28,6 @@ define(
var actionSelected,
actionCurrent,
mockWindow,
mockDomainObject,
mockContextCurrent,
mockContextSelected,
mockUrlService;

View File

@@ -26,7 +26,7 @@ define(
describe("Properties dialog", function () {
var type, properties, domainObject, model, dialog;
var type, properties, model, dialog;
beforeEach(function () {
type = {

View File

@@ -93,8 +93,7 @@ define(
});
it("exposes a warning message for unload", function () {
var obj = mockObject,
errorMessage = "Unsaved changes";
var errorMessage = "Unsaved changes";
// Normally, should be undefined
expect(controller.getUnloadWarning()).toBeUndefined();

View File

@@ -28,7 +28,6 @@ define(
var captured,
completionCapability,
object,
mockQ,
mockType,
cache;
@@ -45,7 +44,7 @@ define(
type: mockType
}[key];
},
hasCapability: function (key) {
hasCapability: function () {
return false;
}
};

View File

@@ -25,7 +25,11 @@ define(
function (EditableDomainObject) {
describe("Editable domain object", function () {
var object;
beforeEach(function () {
object = new EditableDomainObject();
});
});
}
);

View File

@@ -25,8 +25,7 @@ define(
function (EditableViewPolicy) {
describe("The editable view policy", function () {
var testView,
mockDomainObject,
var mockDomainObject,
testMode,
policy;

View File

@@ -147,7 +147,7 @@ define(
});
it("invokes setters on update", function () {
var structure, state;
var structure;
testABC.a = jasmine.createSpy('a');

View File

@@ -28,7 +28,6 @@ define(
describe("The FormatProvider", function () {
var mockFormats,
mockLog,
mockFormatInstances,
provider;

View File

@@ -40,14 +40,6 @@ define(
testRect,
mctPopup;
function testEvent(x, y) {
return {
pageX: x,
pageY: y,
preventDefault: jasmine.createSpy("preventDefault")
};
}
beforeEach(function () {
mockCompile =
jasmine.createSpy("$compile");

View File

@@ -21,8 +21,8 @@
*****************************************************************************/
define(
['../../src/services/InfoService', '../../src/InfoConstants'],
function (InfoService, InfoConstants) {
['../../src/services/InfoService'],
function (InfoService) {
describe("The info service", function () {
var mockCompile,

View File

@@ -27,7 +27,8 @@ define(
describe("The notification indicator controller ", function () {
var mockNotificationService,
mockScope,
mockDialogService;
mockDialogService,
controller;
beforeEach(function(){
mockNotificationService = jasmine.createSpy("notificationService");
@@ -36,19 +37,18 @@ define(
"dialogService",
["getDialogResponse","dismiss"]
);
});
it("exposes the highest notification severity to the template", function() {
mockNotificationService.highest = {
severity: "error"
};
var controller = new NotificationIndicatorController(mockScope, mockNotificationService, mockDialogService);
controller = new NotificationIndicatorController(mockScope, mockNotificationService, mockDialogService);
});
it("exposes the highest notification severity to the template", function() {
expect(mockScope.highest).toBeTruthy();
expect(mockScope.highest.severity).toBe("error");
});
it("invokes the dialog service to show list of messages", function() {
var controller = new NotificationIndicatorController(mockScope, mockNotificationService, mockDialogService);
expect(mockScope.showNotificationsList).toBeDefined();
mockScope.showNotificationsList();
expect(mockDialogService.getDialogResponse).toHaveBeenCalled();
@@ -61,7 +61,6 @@ define(
});
it("provides a means of dismissing the message list", function() {
var controller = new NotificationIndicatorController(mockScope, mockNotificationService, mockDialogService);
expect(mockScope.showNotificationsList).toBeDefined();
mockScope.showNotificationsList();
expect(mockDialogService.getDialogResponse).toHaveBeenCalled();