File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ describe('hover info', function() {
103
103
var mockCopy = Lib . extendDeep ( { } , mock ) ;
104
104
105
105
mockCopy . data [ 0 ] . text = [ ] ;
106
- mockCopy . data [ 0 ] . text [ 17 ] = 'hover text' ;
106
+ // we convert newlines to spaces
107
+ // see https://github.com/plotly/plotly.js/issues/746
108
+ mockCopy . data [ 0 ] . text [ 17 ] = 'hover\ntext\n\rwith\r\nspaces\n\nnot\rnewlines' ;
107
109
mockCopy . data [ 0 ] . hoverinfo = 'text' ;
108
110
109
111
beforeEach ( function ( done ) {
@@ -123,7 +125,8 @@ describe('hover info', function() {
123
125
124
126
expect ( d3 . selectAll ( 'g.axistext' ) . size ( ) ) . toEqual ( 0 ) ;
125
127
expect ( d3 . selectAll ( 'g.hovertext' ) . size ( ) ) . toEqual ( 1 ) ;
126
- expect ( d3 . selectAll ( 'g.hovertext' ) . select ( 'text' ) . html ( ) ) . toEqual ( 'hover text' ) ;
128
+ expect ( d3 . selectAll ( 'g.hovertext' ) . select ( 'text' ) . html ( ) )
129
+ . toEqual ( 'hover text with spaces not newlines' ) ;
127
130
} ) ;
128
131
} ) ;
129
132
You can’t perform that action at this time.
0 commit comments