Skip to content

Commit 896471c

Browse files
committed
update scattergeo test
1 parent 3a11062 commit 896471c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/jasmine/tests/scattergeo_test.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,30 @@ describe('Test scattergeo defaults', function() {
2626
traceOut = {};
2727
});
2828

29-
it('should slice lat if it it longer than lon', function() {
29+
it('should not slice lat if it it longer than lon', function() {
30+
// this is handled at the calc step now via _length.
3031
traceIn = {
3132
lon: [-75],
3233
lat: [45, 45, 45]
3334
};
3435

3536
ScatterGeo.supplyDefaults(traceIn, traceOut, defaultColor, layout);
36-
expect(traceOut.lat).toEqual([45]);
37+
expect(traceOut.lat).toEqual([45, 45, 45]);
3738
expect(traceOut.lon).toEqual([-75]);
39+
expect(traceOut._length).toBe(1);
3840
});
3941

4042
it('should slice lon if it it longer than lat', function() {
43+
// this is handled at the calc step now via _length.
4144
traceIn = {
4245
lon: [-75, -75, -75],
4346
lat: [45]
4447
};
4548

4649
ScatterGeo.supplyDefaults(traceIn, traceOut, defaultColor, layout);
4750
expect(traceOut.lat).toEqual([45]);
48-
expect(traceOut.lon).toEqual([-75]);
51+
expect(traceOut.lon).toEqual([-75, -75, -75]);
52+
expect(traceOut._length).toBe(1);
4953
});
5054

5155
it('should not coerce lat and lon if locations is valid', function() {

0 commit comments

Comments
 (0)