[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

@@ -31,7 +31,6 @@ define(
var mockScope,
mockTicker,
mockUnticker,
mockDomainObject,
controller;
beforeEach(function () {

View File

@@ -45,10 +45,6 @@ define(
].reduce(sum, 0);
}
function twoDigits(n) {
return n < 10 ? ('0' + n) : n;
}
it("formats short-form values (no days)", function () {
expect(formatter.short(toDuration(0, 123, 2, 3) + 123))
.toEqual("123:02:03");

View File

@@ -33,16 +33,6 @@ define(
mockSeries,
decorator;
function seriesIsInWindow(series) {
var i, v, inWindow = true;
for (i = 0; i < series.getPointCount(); i += 1) {
v = series.getDomainValue(i);
inWindow = inWindow && (v >= mockConductor.displayStart());
inWindow = inWindow && (v <= mockConductor.displayEnd());
}
return inWindow;
}
beforeEach(function () {
mockTelemetryService = jasmine.createSpyObj(
'telemetryService',

View File

@@ -30,7 +30,6 @@ define(
describe("The messages view policy", function () {
var mockDomainObject,
mockTelemetry,
telemetryType,
testType,
testView,
testMetadata,
@@ -50,7 +49,7 @@ define(
['getMetadata']
);
mockDomainObject.getModel.andCallFake(function (c) {
mockDomainObject.getModel.andCallFake(function () {
return {type: testType};
});
mockDomainObject.getCapability.andCallFake(function (c) {

View File

@@ -235,7 +235,7 @@ define(
});
it("ensures a minimum frame size", function () {
var styleB, styleC;
var styleB;
// Start with a very small frame size
testModel.layoutGrid = [ 1, 1 ];

View File

@@ -32,7 +32,6 @@ define(
mockCompositionCapability,
mockComposition,
mockUnlisten,
mockFormUnlisten,
mockChildOne,
mockChildTwo,
model,

View File

@@ -25,8 +25,7 @@ define(
function (PlotOptionsForm) {
describe("The Plot Options form", function () {
var plotOptionsForm,
listener;
var plotOptionsForm;
beforeEach(function () {

View File

@@ -29,7 +29,6 @@ define(
testRange,
mockTelemetryObjects,
testData,
mockLimitCapabilities,
tracker;
beforeEach(function () {

View File

@@ -61,6 +61,8 @@ define(
var datas = [makeMockData(1)],
preparer = new PlotPreparer(datas, "testDomain", "testRange");
expect(preparer).toBeDefined();
expect(datas[0].getDomainValue).toHaveBeenCalledWith(
jasmine.any(Number),
"testDomain"

View File

@@ -30,20 +30,11 @@ define(
describe("Overlaid plot mode", function () {
var mockDomainObject,
mockSubPlotFactory,
mockSubPlot,
mockPrepared,
testBuffers,
testDrawingObjects,
mode;
function mockElement(x, y, w, h) {
return {
getBoundingClientRect: function () {
return { left: x, top: y, width: w, height: h };
}
};
}
function createMockSubPlot() {
var mockSubPlot = jasmine.createSpyObj(
"subPlot",
@@ -127,7 +118,7 @@ define(
mode.plotTelemetry(mockPrepared);
// Should have one sub-plot with three lines
testDrawingObjects.forEach(function (testDrawingObject, i) {
testDrawingObjects.forEach(function (testDrawingObject) {
// Either empty list or undefined is fine;
// just want to make sure there are no lines.
expect(testDrawingObject.lines.length)
@@ -178,7 +169,7 @@ define(
});
// Step back the same number of zoom changes
mockSubPlotFactory.createSubPlot.calls.forEach(function (c) {
mockSubPlotFactory.createSubPlot.calls.forEach(function () {
// Should still be zoomed at start of each iteration
expect(mode.isZoomed()).toBeTruthy();
// Step back one of the zoom changes.

View File

@@ -30,20 +30,11 @@ define(
describe("Stacked plot mode", function () {
var mockDomainObject,
mockSubPlotFactory,
mockSubPlot,
mockPrepared,
testBuffers,
testDrawingObjects,
mode;
function mockElement(x, y, w, h) {
return {
getBoundingClientRect: function () {
return { left: x, top: y, width: w, height: h };
}
};
}
function createMockSubPlot() {
var mockSubPlot = jasmine.createSpyObj(
"subPlot",
@@ -172,7 +163,7 @@ define(
});
// Step back the same number of zoom changes
mockSubPlotFactory.createSubPlot.calls.forEach(function (c) {
mockSubPlotFactory.createSubPlot.calls.forEach(function () {
// Should still be zoomed at start of each iteration
expect(mode.isZoomed()).toBeTruthy();
// Step back

View File

@@ -34,14 +34,6 @@ define(
mockTimeout,
mockElement;
function promise(value) {
return {
then: function (callback){
return promise(callback(value));
}
};
}
beforeEach(function() {
watches = {};

View File

@@ -32,14 +32,6 @@ define(
controller,
mockScope;
function promise(value) {
return {
then: function (callback){
return promise(callback(value));
}
};
}
beforeEach(function() {
mockCapability = jasmine.createSpyObj('mutationCapability', [
'listen'

View File

@@ -130,8 +130,6 @@ define(
it('to create column configuration, which is written to the' +
' object model', function() {
var mockModel = {};
controller.setup();
expect(mockTable.getColumnConfiguration).toHaveBeenCalled();
expect(mockTable.saveColumnConfiguration).toHaveBeenCalled();

View File

@@ -33,7 +33,6 @@ define(
mockElement,
testAttrs,
mockSwimlane,
mockRealElement,
testEvent,
handlers,
directive;