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() {
103103 var mockCopy = Lib . extendDeep ( { } , mock ) ;
104104
105105 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' ;
107109 mockCopy . data [ 0 ] . hoverinfo = 'text' ;
108110
109111 beforeEach ( function ( done ) {
@@ -123,7 +125,8 @@ describe('hover info', function() {
123125
124126 expect ( d3 . selectAll ( 'g.axistext' ) . size ( ) ) . toEqual ( 0 ) ;
125127 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' ) ;
127130 } ) ;
128131 } ) ;
129132
You can’t perform that action at this time.
0 commit comments