mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 11:17:04 +00:00
[Frontend] Code style cleanups in Timer *spec files
Fixes #623 Moved testState() function placement in code; Added semicolons;
This commit is contained in:
parent
4072b91808
commit
6459f410e7
@ -39,6 +39,18 @@ define(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testState(type, timerState, timestamp, expected) {
|
||||||
|
testModel.type = type;
|
||||||
|
testModel.timerState = timerState;
|
||||||
|
testModel.timestamp = timestamp;
|
||||||
|
|
||||||
|
if (expected) {
|
||||||
|
expect(PauseTimerAction.appliesTo(testContext)).toBeTruthy();
|
||||||
|
} else {
|
||||||
|
expect(PauseTimerAction.appliesTo(testContext)).toBeFalsy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockNow = jasmine.createSpy('now');
|
mockNow = jasmine.createSpy('now');
|
||||||
mockDomainObject = jasmine.createSpyObj(
|
mockDomainObject = jasmine.createSpyObj(
|
||||||
@ -88,18 +100,6 @@ define(
|
|||||||
//not a timer
|
//not a timer
|
||||||
testState('clock', 'started', 12000, false);
|
testState('clock', 'started', 12000, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
function testState(type, timerState, timestamp, expected) {
|
|
||||||
testModel.type = type;
|
|
||||||
testModel.timerState = timerState;
|
|
||||||
testModel.timestamp = timestamp;
|
|
||||||
|
|
||||||
if (expected) {
|
|
||||||
expect(PauseTimerAction.appliesTo(testContext)).toBeTruthy()
|
|
||||||
} else {
|
|
||||||
expect(PauseTimerAction.appliesTo(testContext)).toBeFalsy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -39,6 +39,18 @@ define(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testState(type, timerState, timestamp, expected) {
|
||||||
|
testModel.type = type;
|
||||||
|
testModel.timerState = timerState;
|
||||||
|
testModel.timestamp = timestamp;
|
||||||
|
|
||||||
|
if (expected) {
|
||||||
|
expect(RestartTimerAction.appliesTo(testContext)).toBeTruthy();
|
||||||
|
} else {
|
||||||
|
expect(RestartTimerAction.appliesTo(testContext)).toBeFalsy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockNow = jasmine.createSpy('now');
|
mockNow = jasmine.createSpy('now');
|
||||||
mockDomainObject = jasmine.createSpyObj(
|
mockDomainObject = jasmine.createSpyObj(
|
||||||
@ -94,18 +106,6 @@ define(
|
|||||||
//not a timer
|
//not a timer
|
||||||
testState('clock', 'paused', 12000, false);
|
testState('clock', 'paused', 12000, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
function testState(type, timerState, timestamp, expected) {
|
|
||||||
testModel.type = type;
|
|
||||||
testModel.timerState = timerState;
|
|
||||||
testModel.timestamp = timestamp;
|
|
||||||
|
|
||||||
if (expected) {
|
|
||||||
expect(RestartTimerAction.appliesTo(testContext)).toBeTruthy()
|
|
||||||
} else {
|
|
||||||
expect(RestartTimerAction.appliesTo(testContext)).toBeFalsy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -39,6 +39,18 @@ define(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testState(type, timerState, timestamp, expected) {
|
||||||
|
testModel.type = type;
|
||||||
|
testModel.timerState = timerState;
|
||||||
|
testModel.timestamp = timestamp;
|
||||||
|
|
||||||
|
if (expected) {
|
||||||
|
expect(StartTimerAction.appliesTo(testContext)).toBeTruthy();
|
||||||
|
} else {
|
||||||
|
expect(StartTimerAction.appliesTo(testContext)).toBeFalsy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockNow = jasmine.createSpy('now');
|
mockNow = jasmine.createSpy('now');
|
||||||
mockDomainObject = jasmine.createSpyObj(
|
mockDomainObject = jasmine.createSpyObj(
|
||||||
@ -93,18 +105,6 @@ define(
|
|||||||
//not a timer
|
//not a timer
|
||||||
testState('clock', 'paused', 12000, false);
|
testState('clock', 'paused', 12000, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
function testState(type, timerState, timestamp, expected) {
|
|
||||||
testModel.type = type;
|
|
||||||
testModel.timerState = timerState;
|
|
||||||
testModel.timestamp = timestamp;
|
|
||||||
|
|
||||||
if (expected) {
|
|
||||||
expect(StartTimerAction.appliesTo(testContext)).toBeTruthy()
|
|
||||||
} else {
|
|
||||||
expect(StartTimerAction.appliesTo(testContext)).toBeFalsy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -39,6 +39,18 @@ define(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testState(type, timerState, timestamp, expected) {
|
||||||
|
testModel.type = type;
|
||||||
|
testModel.timerState = timerState;
|
||||||
|
testModel.timestamp = timestamp;
|
||||||
|
|
||||||
|
if (expected) {
|
||||||
|
expect(StopTimerAction.appliesTo(testContext)).toBeTruthy();
|
||||||
|
} else {
|
||||||
|
expect(StopTimerAction.appliesTo(testContext)).toBeFalsy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockNow = jasmine.createSpy('now');
|
mockNow = jasmine.createSpy('now');
|
||||||
mockDomainObject = jasmine.createSpyObj(
|
mockDomainObject = jasmine.createSpyObj(
|
||||||
@ -93,18 +105,6 @@ define(
|
|||||||
//not a timer
|
//not a timer
|
||||||
testState('clock', 'paused', 12000, false);
|
testState('clock', 'paused', 12000, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
function testState(type, timerState, timestamp, expected) {
|
|
||||||
testModel.type = type;
|
|
||||||
testModel.timerState = timerState;
|
|
||||||
testModel.timestamp = timestamp;
|
|
||||||
|
|
||||||
if (expected) {
|
|
||||||
expect(StopTimerAction.appliesTo(testContext)).toBeTruthy()
|
|
||||||
} else {
|
|
||||||
expect(StopTimerAction.appliesTo(testContext)).toBeFalsy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user