@@ -259,7 +259,7 @@ describe('scattermapbox convert', function() {
259
259
lat : [ 20 , 20 , '10' , null , 10 , 10 , 20 ]
260
260
} ;
261
261
262
- it ( 'for markers + circle bubbles traces, should ' , function ( ) {
262
+ it ( 'should generate correct output for markers + circle bubbles traces' , function ( ) {
263
263
var opts = _convert ( Lib . extendFlat ( { } , base , {
264
264
mode : 'markers' ,
265
265
marker : {
@@ -276,12 +276,12 @@ describe('scattermapbox convert', function() {
276
276
stops : [
277
277
[ 0 , 'rgb(220, 220, 220)' ] , [ 1 , '#444' ] , [ 2 , 'rgb(178, 10, 28)' ]
278
278
]
279
- } , 'have correct circle-color stops' ) ;
279
+ } , 'circle-color stops' ) ;
280
280
281
281
expect ( opts . circle . paint [ 'circle-radius' ] ) . toEqual ( {
282
282
property : 'circle-radius' ,
283
283
stops : [ [ 0 , 5 ] , [ 1 , 10 ] , [ 2 , 0 ] ]
284
- } , 'have correct circle-radius stops' ) ;
284
+ } , 'circle-radius stops' ) ;
285
285
286
286
var circleProps = opts . circle . geojson . features . map ( function ( f ) {
287
287
return f . properties ;
@@ -294,10 +294,10 @@ describe('scattermapbox convert', function() {
294
294
{ 'circle-color' : 2 , 'circle-radius' : 2 } ,
295
295
{ 'circle-color' : 1 , 'circle-radius' : 2 } ,
296
296
{ 'circle-color' : 1 , 'circle-radius' : 2 }
297
- ] , 'have correct geojson feature properties' ) ;
297
+ ] , 'geojson feature properties' ) ;
298
298
} ) ;
299
299
300
- it ( 'fill + markers + lines traces, should ' , function ( ) {
300
+ it ( 'should generate correct output for fill + markers + lines traces' , function ( ) {
301
301
var opts = _convert ( Lib . extendFlat ( { } , base , {
302
302
mode : 'markers+lines' ,
303
303
marker : { symbol : 'circle' } ,
@@ -312,19 +312,19 @@ describe('scattermapbox convert', function() {
312
312
var lineCoords = [ segment1 , segment2 ] ,
313
313
fillCoords = [ [ segment1 ] , [ segment2 ] ] ;
314
314
315
- expect ( opts . line . geojson . coordinates ) . toEqual ( lineCoords , 'have correct line coords' ) ;
316
- expect ( opts . fill . geojson . coordinates ) . toEqual ( fillCoords , 'have correct fill coords' ) ;
315
+ expect ( opts . line . geojson . coordinates ) . toEqual ( lineCoords , 'line coords' ) ;
316
+ expect ( opts . fill . geojson . coordinates ) . toEqual ( fillCoords , 'fill coords' ) ;
317
317
318
318
var circleCoords = opts . circle . geojson . features . map ( function ( f ) {
319
319
return f . geometry . coordinates ;
320
320
} ) ;
321
321
322
322
expect ( circleCoords ) . toEqual ( [
323
323
[ 10 , 20 ] , [ 20 , 20 ] , [ 30 , 10 ] , [ 20 , 10 ] , [ 10 , 20 ]
324
- ] , 'have correct circle coords' ) ;
324
+ ] , 'circle coords' ) ;
325
325
} ) ;
326
326
327
- it ( 'for markers + non-circle traces, should ' , function ( ) {
327
+ it ( 'should generate correct output for markers + non-circle traces' , function ( ) {
328
328
var opts = _convert ( Lib . extendFlat ( { } , base , {
329
329
mode : 'markers' ,
330
330
marker : { symbol : 'monument' }
@@ -340,10 +340,10 @@ describe('scattermapbox convert', function() {
340
340
return [ 'monument' , '' ] ;
341
341
} ) ;
342
342
343
- expect ( symbolProps ) . toEqual ( expected , 'have correct geojson properties' ) ;
343
+ expect ( symbolProps ) . toEqual ( expected , 'geojson properties' ) ;
344
344
} ) ;
345
345
346
- it ( 'for text + lines traces, should ' , function ( ) {
346
+ it ( 'should generate correct output for text + lines traces' , function ( ) {
347
347
var opts = _convert ( Lib . extendFlat ( { } , base , {
348
348
mode : 'lines+text' ,
349
349
connectgaps : true ,
@@ -356,7 +356,7 @@ describe('scattermapbox convert', function() {
356
356
[ 10 , 20 ] , [ 20 , 20 ] , [ 30 , 10 ] , [ 20 , 10 ] , [ 10 , 20 ]
357
357
] ;
358
358
359
- expect ( opts . line . geojson . coordinates ) . toEqual ( lineCoords , 'have correct line coords' ) ;
359
+ expect ( opts . line . geojson . coordinates ) . toEqual ( lineCoords , 'line coords' ) ;
360
360
361
361
var actualText = opts . symbol . geojson . features . map ( function ( f ) {
362
362
return f . properties . text ;
@@ -365,7 +365,7 @@ describe('scattermapbox convert', function() {
365
365
expect ( actualText ) . toEqual ( [ 'A' , 'B' , 'C' , 'F' , '' ] ) ;
366
366
} ) ;
367
367
368
- it ( 'for lines traces with trailing gaps' , function ( ) {
368
+ it ( 'should generate correct output for lines traces with trailing gaps' , function ( ) {
369
369
var opts = _convert ( Lib . extendFlat ( { } , base , {
370
370
mode : 'lines' ,
371
371
lon : [ 10 , '20' , 30 , 20 , null , 20 , 10 , null , null ] ,
@@ -412,15 +412,15 @@ describe('scattermapbox convert', function() {
412
412
} ) ;
413
413
} ) ;
414
414
415
- it ( 'for markers + circle bubbles traces with repeated values, should ' , function ( ) {
415
+ it ( 'should generate correct output for markers + circle bubbles traces with repeated values' , function ( ) {
416
416
var opts = _convert ( Lib . extendFlat ( { } , base , {
417
417
lon : [ '-96.796988' , '-81.379236' , '-85.311819' , '' ] ,
418
418
lat : [ '32.776664' , '28.538335' , '35.047157' , '' ] ,
419
419
marker : { size : [ '5' , '49' , '5' , '' ] }
420
420
} ) ) ;
421
421
422
422
expect ( opts . circle . paint [ 'circle-radius' ] . stops )
423
- . toBeCloseTo2DArray ( [ [ 0 , 2.5 ] , [ 1 , 24.5 ] ] , 'not replicate stops' ) ;
423
+ . toBeCloseTo2DArray ( [ [ 0 , 2.5 ] , [ 1 , 24.5 ] ] , 'no replicate stops' ) ;
424
424
425
425
var radii = opts . circle . geojson . features . map ( function ( f ) {
426
426
return f . properties [ 'circle-radius' ] ;
@@ -429,7 +429,7 @@ describe('scattermapbox convert', function() {
429
429
expect ( radii ) . toBeCloseToArray ( [ 0 , 1 , 0 ] , 'link features to correct stops' ) ;
430
430
} ) ;
431
431
432
- it ( 'for input only blank pts ' , function ( ) {
432
+ it ( 'should generate correct output for traces with only blank points ' , function ( ) {
433
433
var opts = _convert ( Lib . extendFlat ( { } , base , {
434
434
mode : 'lines' ,
435
435
lon : [ '' , null ] ,
@@ -439,18 +439,16 @@ describe('scattermapbox convert', function() {
439
439
440
440
assertVisibility ( opts , [ 'none' , 'none' , 'none' , 'none' ] ) ;
441
441
442
- expect ( opts . line . geojson . coordinates ) . toEqual ( [ ] , 'have correct line coords' ) ;
443
- expect ( opts . fill . geojson . coordinates ) . toEqual ( [ ] , 'have correct fill coords' ) ;
442
+ expect ( opts . line . geojson . coordinates ) . toEqual ( [ ] , 'line coords' ) ;
443
+ expect ( opts . fill . geojson . coordinates ) . toEqual ( [ ] , 'fill coords' ) ;
444
444
} ) ;
445
445
446
446
function assertVisibility ( opts , expectations ) {
447
447
var actual = [ 'fill' , 'line' , 'circle' , 'symbol' ] . map ( function ( l ) {
448
448
return opts [ l ] . layout . visibility ;
449
449
} ) ;
450
450
451
- var msg = 'set layer visibility properly' ;
452
-
453
- expect ( actual ) . toEqual ( expectations , msg ) ;
451
+ expect ( actual ) . toEqual ( expectations , 'layer visibility' ) ;
454
452
}
455
453
} ) ;
456
454
0 commit comments