@@ -145,30 +145,6 @@ describe('parcoords initialization tests', function() {
145145 } ) ;
146146 } ) ;
147147
148- it ( '\'dimensions.values\' and \'line.color\' should convert typed arrays to normal arrays' , function ( ) {
149- var fullTrace = _supply ( {
150- dimensions : [ {
151- range : [ 1 , 5 ] ,
152- label : 'A' ,
153- values : [ 1 , 4 , 3 ]
154- } , {
155- range : [ 1 , 5 ] ,
156- label : 'B' ,
157- values : new Float64Array ( [ 3 , 1.5 , 2 ] ) ,
158- } , {
159- range : [ 1 , 5 ] ,
160- label : 'C' ,
161- values : new Int32Array ( [ 2 , 4 , 1 ] ) ,
162- } ] ,
163- line : {
164- color : new Int32Array ( [ 0 , 1 , 2 ] )
165- }
166- } ) ;
167- expect ( Array . isArray ( fullTrace . line . color ) === true ) . toEqual ( true ) ;
168- expect ( Array . isArray ( fullTrace . dimensions [ 1 ] . values ) === true ) . toEqual ( true ) ;
169- expect ( Array . isArray ( fullTrace . dimensions [ 2 ] . values ) === true ) . toEqual ( true ) ;
170- } ) ;
171-
172148 it ( '\'domain\' specification should have a default' , function ( ) {
173149 var fullTrace = _supply ( { } ) ;
174150 expect ( fullTrace . domain ) . toEqual ( { x : [ 0 , 1 ] , y : [ 0 , 1 ] } ) ;
@@ -350,6 +326,30 @@ describe('parcoords initialization tests', function() {
350326 color : '#444'
351327 } ) ;
352328 } ) ;
329+
330+ it ( '\'dimensions.values\' and \'line.color\' should convert typed arrays to normal arrays' , function ( ) {
331+ var fullTrace = _calc ( Lib . extendDeep ( { } , base , {
332+ dimensions : [ {
333+ range : [ 1 , 5 ] ,
334+ label : 'A' ,
335+ values : [ 1 , 4 , 3 ]
336+ } , {
337+ range : [ 1 , 5 ] ,
338+ label : 'B' ,
339+ values : new Float64Array ( [ 3 , 1.5 , 2 ] ) ,
340+ } , {
341+ range : [ 1 , 5 ] ,
342+ label : 'C' ,
343+ values : new Int32Array ( [ 2 , 4 , 1 ] ) ,
344+ } ] ,
345+ line : {
346+ color : new Int32Array ( [ 0 , 1 , 2 ] )
347+ }
348+ } ) ) ;
349+ expect ( Array . isArray ( fullTrace . line . color ) === true ) . toEqual ( true ) ;
350+ expect ( Array . isArray ( fullTrace . dimensions [ 1 ] . values ) === true ) . toEqual ( true ) ;
351+ expect ( Array . isArray ( fullTrace . dimensions [ 2 ] . values ) === true ) . toEqual ( true ) ;
352+ } ) ;
353353 } ) ;
354354} ) ;
355355
0 commit comments