@@ -90,6 +90,15 @@ describe('Test sort transform calc:', function() {
90
90
expect ( out [ 0 ] . ids ) . toEqual ( [ 'n0' , 'n2' , 'n1' , 'z' , 'p1' , 'p3' , 'p2' ] ) ;
91
91
expect ( out [ 0 ] . marker . color ) . toEqual ( [ 0.1 , 0.3 , 0.2 , 0.1 , 0.2 , 0.4 , 0.3 ] ) ;
92
92
expect ( out [ 0 ] . marker . size ) . toEqual ( [ 10 , 5 , 20 , 1 , 6 , 10 , 0 ] ) ;
93
+ expect ( out [ 0 ] . transforms [ 0 ] . _indexToPoints ) . toEqual ( {
94
+ 0 : [ 0 ] ,
95
+ 1 : [ 2 ] ,
96
+ 2 : [ 1 ] ,
97
+ 3 : [ 3 ] ,
98
+ 4 : [ 4 ] ,
99
+ 5 : [ 6 ] ,
100
+ 6 : [ 5 ]
101
+ } ) ;
93
102
} ) ;
94
103
95
104
it ( 'should sort all array attributes (descending case)' , function ( ) {
@@ -104,6 +113,15 @@ describe('Test sort transform calc:', function() {
104
113
expect ( out [ 0 ] . ids ) . toEqual ( [ 'p2' , 'p1' , 'p3' , 'z' , 'n1' , 'n0' , 'n2' ] ) ;
105
114
expect ( out [ 0 ] . marker . color ) . toEqual ( [ 0.3 , 0.2 , 0.4 , 0.1 , 0.2 , 0.1 , 0.3 ] ) ;
106
115
expect ( out [ 0 ] . marker . size ) . toEqual ( [ 0 , 6 , 10 , 1 , 20 , 10 , 5 ] ) ;
116
+ expect ( out [ 0 ] . transforms [ 0 ] . _indexToPoints ) . toEqual ( {
117
+ 0 : [ 5 ] ,
118
+ 1 : [ 4 ] ,
119
+ 2 : [ 6 ] ,
120
+ 3 : [ 3 ] ,
121
+ 4 : [ 1 ] ,
122
+ 5 : [ 0 ] ,
123
+ 6 : [ 2 ]
124
+ } ) ;
107
125
} ) ;
108
126
109
127
it ( 'should sort via nested targets' , function ( ) {
@@ -119,6 +137,15 @@ describe('Test sort transform calc:', function() {
119
137
expect ( out [ 0 ] . ids ) . toEqual ( [ 'n1' , 'n0' , 'p3' , 'p1' , 'n2' , 'z' , 'p2' ] ) ;
120
138
expect ( out [ 0 ] . marker . color ) . toEqual ( [ 0.2 , 0.1 , 0.4 , 0.2 , 0.3 , 0.1 , 0.3 ] ) ;
121
139
expect ( out [ 0 ] . marker . size ) . toEqual ( [ 20 , 10 , 10 , 6 , 5 , 1 , 0 ] ) ;
140
+ expect ( out [ 0 ] . transforms [ 0 ] . _indexToPoints ) . toEqual ( {
141
+ 0 : [ 1 ] ,
142
+ 1 : [ 0 ] ,
143
+ 2 : [ 6 ] ,
144
+ 3 : [ 4 ] ,
145
+ 4 : [ 2 ] ,
146
+ 5 : [ 3 ] ,
147
+ 6 : [ 5 ]
148
+ } ) ;
122
149
} ) ;
123
150
124
151
it ( 'should sort via dates targets' , function ( ) {
0 commit comments