File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,26 @@ describe('Worldmap', () => {
517
517
expect ( worldMap . circles [ 0 ] . _popup . _content ) . toBe ( 'Sweden: 1\nSweden: 2' ) ;
518
518
} ) ;
519
519
} ) ;
520
+
521
+ describe ( 'when a data point has a value of NaN' , ( ) => {
522
+ beforeEach ( ( ) => {
523
+ ctrl . data = new DataBuilder ( )
524
+ . withCountryAndValue ( 'SE' , NaN )
525
+ . build ( ) ;
526
+ } ) ;
527
+
528
+ it ( 'should create a popup which contains n/a' , ( ) => {
529
+ worldMap . drawCircles ( ) ;
530
+ expect ( worldMap . circles [ 0 ] . _popup . _content ) . toBe ( 'Sweden: n/a' ) ;
531
+ } ) ;
532
+
533
+ it ( 'should create a popup which should not contain n/a, when formatOmitEmptyValue is set' , ( ) => {
534
+ ctrl . panel . formatOmitEmptyValue = true ;
535
+ worldMap . drawCircles ( ) ;
536
+ expect ( worldMap . circles [ 0 ] . _popup . _content ) . toBe ( 'Sweden' ) ;
537
+ } ) ;
538
+ } ) ;
539
+
520
540
} ) ;
521
541
522
542
describe ( 'WorldmapFoundation' , ( ) => {
You can’t perform that action at this time.
0 commit comments