@@ -62,7 +62,7 @@ describe('filter transforms defaults:', function() {
6262 traceIn = {
6363 x : [ 1 , 2 , 3 ] ,
6464 transforms : [ {
65- type : 'filter' ,
65+ type : 'filter'
6666 } , {
6767 type : 'filter' ,
6868 target : 0
@@ -143,6 +143,7 @@ describe('filter transforms calc:', function() {
143143 expect ( out [ 0 ] . x ) . toEqual ( [ 0 , 1 ] ) ;
144144 expect ( out [ 0 ] . y ) . toEqual ( [ 1 , 2 ] ) ;
145145 expect ( out [ 0 ] . z ) . toEqual ( [ '2016-10-21' , '2016-12-02' ] ) ;
146+ expect ( out [ 0 ] . transforms [ 0 ] . indexToPoints ) . toEqual ( { 0 : [ 3 ] , 1 :[ 4 ] } ) ;
146147 } ) ;
147148
148149 it ( 'should use the calendar from the target attribute if target is a string' , function ( ) {
@@ -261,13 +262,14 @@ describe('filter transforms calc:', function() {
261262 expect ( out [ 0 ] . x ) . toEqual ( [ - 2 , 2 , 3 ] ) ;
262263 expect ( out [ 0 ] . y ) . toEqual ( [ 3 , 3 , 1 ] ) ;
263264 expect ( out [ 0 ] . marker . color ) . toEqual ( [ 0.3 , 0.3 , 0.4 ] ) ;
265+ expect ( out [ 0 ] . transforms [ 0 ] . indexToPoints ) . toEqual ( { 0 : [ 2 ] , 1 :[ 5 ] , 2 : [ 6 ] } ) ;
264266 } ) ;
265267
266268 it ( 'filters should handle array on base trace attributes' , function ( ) {
267269 var out = _transform ( [ Lib . extendDeep ( { } , base , {
268270 hoverinfo : [ 'x' , 'y' , 'text' , 'name' , 'none' , 'skip' , 'all' ] ,
269271 hoverlabel : {
270- bgcolor : [ 'red' , 'green' , 'blue' , 'black' , 'yellow' , 'cyan' , 'pink' ] ,
272+ bgcolor : [ 'red' , 'green' , 'blue' , 'black' , 'yellow' , 'cyan' , 'pink' ]
271273 } ,
272274 transforms : [ {
273275 type : 'filter' ,
@@ -314,6 +316,8 @@ describe('filter transforms calc:', function() {
314316
315317 expect ( out [ 0 ] . x ) . toEqual ( [ 1 , 2 ] ) ;
316318 expect ( out [ 0 ] . y ) . toEqual ( [ 2 , 3 ] ) ;
319+ expect ( out [ 0 ] . transforms [ 0 ] . indexToPoints ) . toEqual ( { 0 : [ 4 ] , 1 :[ 5 ] , 2 : [ 6 ] } ) ;
320+ expect ( out [ 0 ] . transforms [ 1 ] . indexToPoints ) . toEqual ( { 0 : [ 4 ] , 1 :[ 5 ] } ) ;
317321 } ) ;
318322
319323 it ( 'filters should chain as AND (case 2)' , function ( ) {
@@ -339,6 +343,8 @@ describe('filter transforms calc:', function() {
339343
340344 expect ( out [ 0 ] . x ) . toEqual ( [ 3 ] ) ;
341345 expect ( out [ 0 ] . y ) . toEqual ( [ 1 ] ) ;
346+ expect ( out [ 0 ] . transforms [ 0 ] . indexToPoints ) . toEqual ( { 0 : [ 4 ] , 1 :[ 5 ] , 2 : [ 6 ] } ) ;
347+ expect ( out [ 0 ] . transforms [ 2 ] . indexToPoints ) . toEqual ( { 0 : [ 6 ] } ) ;
342348 } ) ;
343349
344350 it ( 'should preserve gaps in data when `preservegaps` is turned on' , function ( ) {
0 commit comments