@@ -3,29 +3,29 @@ var Annotations = require('@src/components/annotations');
33var Dates = require ( '@src/lib/dates' ) ;
44
55describe ( 'Test annotations' , function ( ) {
6- 'use strict' ;
6+ 'use strict' ;
77
8- describe ( 'supplyLayoutDefaults' , function ( ) {
9- it ( 'should default to not use absolute arrow tail' , function ( ) {
10- var annotationDefaults = { } ;
11- annotationDefaults . _has = function ( ) { return false } ;
8+ describe ( 'supplyLayoutDefaults' , function ( ) {
9+ it ( 'should default to not use absolute arrow tail' , function ( ) {
10+ var annotationDefaults = { } ;
11+ annotationDefaults . _has = function ( ) { return false ; } ;
1212
13- Annotations . supplyLayoutDefaults ( { annotations : [ { showarrow : true , arrowhead : 2 } ] } , annotationDefaults ) ;
13+ Annotations . supplyLayoutDefaults ( { annotations : [ { showarrow : true , arrowhead : 2 } ] } , annotationDefaults ) ;
1414
15- expect ( annotationDefaults . annotations [ 0 ] . absolutetail ) . toBe ( false ) ;
16- } ) ;
15+ expect ( annotationDefaults . annotations [ 0 ] . absolutetail ) . toBe ( false ) ;
16+ } ) ;
1717
18- it ( 'should convert ax/ay date coordinates to milliseconds if absolutetail is true' , function ( ) {
19- var annotationOut = { xaxis : { type : 'date' , range : [ '2000-01-01' , '2016-01-01' ] } } ;
20- annotationOut . _has = function ( ) { return false } ;
18+ it ( 'should convert ax/ay date coordinates to milliseconds if absolutetail is true' , function ( ) {
19+ var annotationOut = { xaxis : { type : 'date' , range : [ '2000-01-01' , '2016-01-01' ] } } ;
20+ annotationOut . _has = function ( ) { return false ; } ;
2121
22- var annotationIn = {
23- annotations : [ { showarrow : true , absolutetail : true , x : '2008-07-01' , ax : '2004-07-01' , y : 0 , ay : 50 } ]
24- } ;
22+ var annotationIn = {
23+ annotations : [ { showarrow : true , absolutetail : true , x : '2008-07-01' , ax : '2004-07-01' , y : 0 , ay : 50 } ]
24+ } ;
2525
26- Annotations . supplyLayoutDefaults ( annotationIn , annotationOut ) ;
26+ Annotations . supplyLayoutDefaults ( annotationIn , annotationOut ) ;
2727
28- expect ( annotationIn . annotations [ 0 ] . ax ) . toEqual ( Dates . dateTime2ms ( '2004-07-01' ) ) ;
28+ expect ( annotationIn . annotations [ 0 ] . ax ) . toEqual ( Dates . dateTime2ms ( '2004-07-01' ) ) ;
29+ } ) ;
2930 } ) ;
30- } ) ;
3131} ) ;
0 commit comments