[Code Style] Run gulp fixstyle
...to apply code style settings from #142.
This commit is contained in:
@@ -88,7 +88,7 @@ define(
|
||||
});
|
||||
|
||||
it("reflects changes to applicable metadata", function () {
|
||||
axis.updateMetadata([ testMetadatas[1] ]);
|
||||
axis.updateMetadata([testMetadatas[1]]);
|
||||
expect(axis.options).toEqual([
|
||||
{ key: "t0", name: "T0" },
|
||||
{ key: "t2", name: "T2" }
|
||||
|
||||
@@ -41,11 +41,11 @@ define(
|
||||
mockTelemetryObjects = ['a', 'b', 'c'].map(function (id, i) {
|
||||
var mockTelemetryObject = jasmine.createSpyObj(
|
||||
'object-' + id,
|
||||
[ 'getId', 'getCapability', 'getModel' ]
|
||||
['getId', 'getCapability', 'getModel']
|
||||
),
|
||||
mockLimitCapability = jasmine.createSpyObj(
|
||||
'limit-' + id,
|
||||
[ 'evaluate' ]
|
||||
['evaluate']
|
||||
);
|
||||
testData[id] = { id: id, value: i };
|
||||
mockTelemetryObject.getId.andReturn(id);
|
||||
|
||||
@@ -38,8 +38,8 @@ define(
|
||||
buffer;
|
||||
|
||||
beforeEach(function () {
|
||||
testDomainValues = [ 1, 3, 7, 9, 14, 15 ];
|
||||
testRangeValues = [ 8, 0, 3, 9, 8, 11 ];
|
||||
testDomainValues = [1, 3, 7, 9, 14, 15];
|
||||
testRangeValues = [8, 0, 3, 9, 8, 11];
|
||||
mockSeries = jasmine.createSpyObj(
|
||||
"series",
|
||||
['getPointCount', 'getDomainValue', 'getRangeValue']
|
||||
@@ -70,7 +70,7 @@ define(
|
||||
// that domain offset was adjusted for.
|
||||
expect(
|
||||
Array.prototype.slice.call(buffer.getBuffer()).slice(0, 12)
|
||||
).toEqual([ -41, 8, -39, 0, -35, 3, -33, 9, -28, 8, -27, 11]);
|
||||
).toEqual([-41, 8, -39, 0, -35, 3, -33, 9, -28, 8, -27, 11]);
|
||||
expect(buffer.getLength()).toEqual(6);
|
||||
});
|
||||
|
||||
@@ -84,8 +84,8 @@ define(
|
||||
});
|
||||
|
||||
it("allows insertion in the middle", function () {
|
||||
var head = [ -41, 8, -39, 0, -35, 3 ],
|
||||
tail = [ -33, 9, -28, 8, -27, 11];
|
||||
var head = [-41, 8, -39, 0, -35, 3],
|
||||
tail = [-33, 9, -28, 8, -27, 11];
|
||||
buffer.insert(mockSeries, 3);
|
||||
expect(
|
||||
Array.prototype.slice.call(buffer.getBuffer()).slice(0, 24)
|
||||
@@ -98,7 +98,7 @@ define(
|
||||
expect(buffer.getLength()).toEqual(4);
|
||||
expect(
|
||||
Array.prototype.slice.call(buffer.getBuffer()).slice(0, 8)
|
||||
).toEqual([ -35, 3, -33, 9, -28, 8, -27, 11]);
|
||||
).toEqual([-35, 3, -33, 9, -28, 8, -27, 11]);
|
||||
});
|
||||
|
||||
it("expands buffer when needed to accommodate more data", function () {
|
||||
|
||||
@@ -101,7 +101,7 @@ define(
|
||||
});
|
||||
|
||||
it("allows series insertion", function () {
|
||||
testSeries = [ [ 50, 42 ], [ 100, 200 ], [ 150, 12321 ] ];
|
||||
testSeries = [[50, 42], [100, 200], [150, 12321]];
|
||||
line.addSeries(mockSeries);
|
||||
// Should have managed insertion index choices to get to...
|
||||
expect(testDomainBuffer).toEqual([50, 100, 150]);
|
||||
@@ -109,7 +109,7 @@ define(
|
||||
});
|
||||
|
||||
it("splits series insertion when necessary", function () {
|
||||
testSeries = [ [ 50, 42 ], [ 100, 200 ], [ 150, 12321 ] ];
|
||||
testSeries = [[50, 42], [100, 200], [150, 12321]];
|
||||
line.addPoint(75, 1);
|
||||
line.addSeries(mockSeries);
|
||||
// Should have managed insertion index choices to get to...
|
||||
@@ -130,4 +130,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -120,4 +120,4 @@ define(
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -49,7 +49,7 @@ define(
|
||||
|
||||
it("synchronizes pan-zoom stack depth", function () {
|
||||
expect(group.getDepth()).toEqual(1);
|
||||
group.getPanZoomStack(1).pushPanZoom([ 10, 20 ], [ 30, 40 ]);
|
||||
group.getPanZoomStack(1).pushPanZoom([10, 20], [30, 40]);
|
||||
stacks.forEach(function (stack) {
|
||||
expect(stack.getDepth()).toEqual(2);
|
||||
});
|
||||
@@ -58,11 +58,11 @@ define(
|
||||
it("synchronizes domain but not range", function () {
|
||||
// Set up different initial states
|
||||
stacks.forEach(function (stack, i) {
|
||||
stack.pushPanZoom([ i, i ], [ i, i ]);
|
||||
stack.pushPanZoom([i, i], [i, i]);
|
||||
});
|
||||
|
||||
// Push a new pan-zoom state onto one of the stacks
|
||||
group.getPanZoomStack(1).pushPanZoom([ 99, 99 ], [ 42, 42 ]);
|
||||
group.getPanZoomStack(1).pushPanZoom([99, 99], [42, 42]);
|
||||
|
||||
// Should changed domain values for all stacks, but
|
||||
// only changed range values for stack 1
|
||||
@@ -85,7 +85,7 @@ define(
|
||||
it("clears pan-zoom on request", function () {
|
||||
// Set up different initial states
|
||||
stacks.forEach(function (stack, i) {
|
||||
stack.pushPanZoom([ i, i ], [ i, i ]);
|
||||
stack.pushPanZoom([i, i], [i, i]);
|
||||
});
|
||||
|
||||
// Verify that we have a greater depth
|
||||
@@ -104,7 +104,7 @@ define(
|
||||
it("pops pan-zoom on request", function () {
|
||||
// Set up different initial states
|
||||
stacks.forEach(function (stack, i) {
|
||||
stack.pushPanZoom([ i, i ], [ i, i ]);
|
||||
stack.pushPanZoom([i, i], [i, i]);
|
||||
});
|
||||
|
||||
// Verify that we have a greater depth
|
||||
@@ -123,4 +123,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -46,10 +46,10 @@ define(
|
||||
}
|
||||
|
||||
beforeEach(function () {
|
||||
initialOrigin = [ 4, 2 ];
|
||||
initialDimensions = [ 600, 400 ];
|
||||
otherOrigins = [ [8, 6], [12, 9] ];
|
||||
otherDimensions = [ [400, 300], [200, 300] ];
|
||||
initialOrigin = [4, 2];
|
||||
initialDimensions = [600, 400];
|
||||
otherOrigins = [[8, 6], [12, 9]];
|
||||
otherDimensions = [[400, 300], [200, 300]];
|
||||
panZoomStack =
|
||||
new PlotPanZoomStack(initialOrigin, initialDimensions);
|
||||
});
|
||||
@@ -96,4 +96,4 @@ define(
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,13 +29,13 @@ define(
|
||||
|
||||
describe("A plot position", function () {
|
||||
var mockPanZoom,
|
||||
testOrigin = [ 10, 20 ],
|
||||
testDimensions = [ 800, 10 ];
|
||||
testOrigin = [10, 20],
|
||||
testDimensions = [800, 10];
|
||||
|
||||
beforeEach(function () {
|
||||
mockPanZoom = jasmine.createSpyObj(
|
||||
"panZoomStack",
|
||||
[ "getPanZoom" ]
|
||||
["getPanZoom"]
|
||||
);
|
||||
mockPanZoom.getPanZoom.andReturn({
|
||||
origin: testOrigin,
|
||||
@@ -64,4 +64,4 @@ define(
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -34,7 +34,7 @@ define(
|
||||
function makeMockData(scale) {
|
||||
var mockData = jasmine.createSpyObj(
|
||||
"data" + scale,
|
||||
[ "getPointCount", "getDomainValue", "getRangeValue" ]
|
||||
["getPointCount", "getDomainValue", "getRangeValue"]
|
||||
);
|
||||
mockData.getPointCount.andReturn(1000);
|
||||
mockData.getDomainValue.andCallFake(function (i) {
|
||||
@@ -90,4 +90,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -31,11 +31,11 @@ define(
|
||||
|
||||
beforeEach(function () {
|
||||
testSeries = [
|
||||
[ 0, 42 ],
|
||||
[ 10, 1 ],
|
||||
[ 20, 4 ],
|
||||
[ 30, 9 ],
|
||||
[ 40, 3 ]
|
||||
[0, 42],
|
||||
[10, 1],
|
||||
[20, 4],
|
||||
[30, 9],
|
||||
[40, 3]
|
||||
];
|
||||
|
||||
mockSeries = jasmine.createSpyObj(
|
||||
@@ -90,4 +90,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -35,16 +35,16 @@ define(
|
||||
beforeEach(function () {
|
||||
mockPanZoomStack = jasmine.createSpyObj(
|
||||
"panZoomStack",
|
||||
[ "getPanZoom" ]
|
||||
["getPanZoom"]
|
||||
);
|
||||
mockFormatter = jasmine.createSpyObj(
|
||||
"formatter",
|
||||
[ "formatDomainValue", "formatRangeValue" ]
|
||||
["formatDomainValue", "formatRangeValue"]
|
||||
);
|
||||
|
||||
mockPanZoomStack.getPanZoom.andReturn({
|
||||
origin: [ 0, 0 ],
|
||||
dimensions: [ 100, 100 ]
|
||||
origin: [0, 0],
|
||||
dimensions: [100, 100]
|
||||
});
|
||||
|
||||
generator =
|
||||
@@ -70,4 +70,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -39,19 +39,19 @@ define(
|
||||
function makeMockDomainObject(id) {
|
||||
var mockDomainObject = jasmine.createSpyObj(
|
||||
"object-" + id,
|
||||
[ "getId", "getCapability", "getModel" ]
|
||||
["getId", "getCapability", "getModel"]
|
||||
);
|
||||
mockDomainObject.getId.andReturn(id);
|
||||
return mockDomainObject;
|
||||
}
|
||||
|
||||
beforeEach(function () {
|
||||
var ids = [ 'a', 'b', 'c' ],
|
||||
var ids = ['a', 'b', 'c'],
|
||||
mockObjects = ids.map(makeMockDomainObject);
|
||||
|
||||
mockSubscription = jasmine.createSpyObj(
|
||||
"subscription",
|
||||
[ "getDomainValue", "getRangeValue", "getTelemetryObjects" ]
|
||||
["getDomainValue", "getRangeValue", "getTelemetryObjects"]
|
||||
);
|
||||
mockSeries = jasmine.createSpyObj(
|
||||
'series',
|
||||
|
||||
Reference in New Issue
Block a user