@@ -38,24 +38,28 @@ describe('scattermapbox defaults', function() {
38
38
return traceOut ;
39
39
}
40
40
41
- it ( 'should truncate \'lon\' if longer than \'lat\'' , function ( ) {
41
+ it ( 'should not truncate \'lon\' if longer than \'lat\'' , function ( ) {
42
+ // this is handled at the calc step now via _length.
42
43
var fullTrace = _supply ( {
43
44
lon : [ 1 , 2 , 3 ] ,
44
45
lat : [ 2 , 3 ]
45
46
} ) ;
46
47
47
- expect ( fullTrace . lon ) . toEqual ( [ 1 , 2 ] ) ;
48
+ expect ( fullTrace . lon ) . toEqual ( [ 1 , 2 , 3 ] ) ;
48
49
expect ( fullTrace . lat ) . toEqual ( [ 2 , 3 ] ) ;
50
+ expect ( fullTrace . _length ) . toBe ( 2 ) ;
49
51
} ) ;
50
52
51
- it ( 'should truncate \'lat\' if longer than \'lon\'' , function ( ) {
53
+ it ( 'should not truncate \'lat\' if longer than \'lon\'' , function ( ) {
54
+ // this is handled at the calc step now via _length.
52
55
var fullTrace = _supply ( {
53
56
lon : [ 1 , 2 , 3 ] ,
54
57
lat : [ 2 , 3 , 3 , 5 ]
55
58
} ) ;
56
59
57
60
expect ( fullTrace . lon ) . toEqual ( [ 1 , 2 , 3 ] ) ;
58
- expect ( fullTrace . lat ) . toEqual ( [ 2 , 3 , 3 ] ) ;
61
+ expect ( fullTrace . lat ) . toEqual ( [ 2 , 3 , 3 , 5 ] ) ;
62
+ expect ( fullTrace . _length ) . toBe ( 3 ) ;
59
63
} ) ;
60
64
61
65
it ( 'should set \'visible\' to false if \'lat\' and/or \'lon\' has zero length' , function ( ) {
0 commit comments