File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ describe('@gl Test removal of gl contexts', function() {
2727 gd = createGraphDiv ( ) ;
2828 } ) ;
2929
30- afterEach ( destroyGraphDiv ) ;
30+ afterEach ( function ( ) {
31+ Plotly . purge ( gd ) ;
32+ destroyGraphDiv ( ) ;
33+ } ) ;
3134
3235 it ( 'Plots.cleanPlot should remove gl context from the graph div of a gl2d plot' , function ( done ) {
3336 Plotly . plot ( gd , [ {
@@ -41,6 +44,7 @@ describe('@gl Test removal of gl contexts', function() {
4144
4245 expect ( ! ! gd . _fullLayout . _plots . xy . _scene ) . toBe ( false ) ;
4346 } )
47+ . catch ( failTest )
4448 . then ( done ) ;
4549 } ) ;
4650
@@ -83,6 +87,7 @@ describe('@gl Test removal of gl contexts', function() {
8387 firstCanvas !== secondCanvas && firstGlContext . isContextLost ( )
8488 ) ;
8589 } )
90+ . catch ( failTest )
8691 . then ( done ) ;
8792 } ) ;
8893} ) ;
@@ -118,6 +123,7 @@ describe('@gl Test gl plot side effects', function() {
118123 var rangeSlider = document . getElementsByClassName ( 'range-slider' ) [ 0 ] ;
119124 expect ( rangeSlider ) . not . toBeDefined ( ) ;
120125 } )
126+ . catch ( failTest )
121127 . then ( done ) ;
122128 } ) ;
123129
@@ -160,6 +166,7 @@ describe('@gl Test gl plot side effects', function() {
160166
161167 return Plotly . purge ( gd ) ;
162168 } )
169+ . catch ( failTest )
163170 . then ( done ) ;
164171 } ) ;
165172
@@ -184,6 +191,7 @@ describe('@gl Test gl plot side effects', function() {
184191 . then ( function ( ) {
185192 expect ( d3 . selectAll ( 'canvas' ) . size ( ) ) . toEqual ( 0 ) ;
186193 } )
194+ . catch ( failTest )
187195 . then ( done ) ;
188196 } ) ;
189197
You can’t perform that action at this time.
0 commit comments