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() {
27
27
gd = createGraphDiv ( ) ;
28
28
} ) ;
29
29
30
- afterEach ( destroyGraphDiv ) ;
30
+ afterEach ( function ( ) {
31
+ Plotly . purge ( gd ) ;
32
+ destroyGraphDiv ( ) ;
33
+ } ) ;
31
34
32
35
it ( 'Plots.cleanPlot should remove gl context from the graph div of a gl2d plot' , function ( done ) {
33
36
Plotly . plot ( gd , [ {
@@ -41,6 +44,7 @@ describe('@gl Test removal of gl contexts', function() {
41
44
42
45
expect ( ! ! gd . _fullLayout . _plots . xy . _scene ) . toBe ( false ) ;
43
46
} )
47
+ . catch ( failTest )
44
48
. then ( done ) ;
45
49
} ) ;
46
50
@@ -83,6 +87,7 @@ describe('@gl Test removal of gl contexts', function() {
83
87
firstCanvas !== secondCanvas && firstGlContext . isContextLost ( )
84
88
) ;
85
89
} )
90
+ . catch ( failTest )
86
91
. then ( done ) ;
87
92
} ) ;
88
93
} ) ;
@@ -118,6 +123,7 @@ describe('@gl Test gl plot side effects', function() {
118
123
var rangeSlider = document . getElementsByClassName ( 'range-slider' ) [ 0 ] ;
119
124
expect ( rangeSlider ) . not . toBeDefined ( ) ;
120
125
} )
126
+ . catch ( failTest )
121
127
. then ( done ) ;
122
128
} ) ;
123
129
@@ -160,6 +166,7 @@ describe('@gl Test gl plot side effects', function() {
160
166
161
167
return Plotly . purge ( gd ) ;
162
168
} )
169
+ . catch ( failTest )
163
170
. then ( done ) ;
164
171
} ) ;
165
172
@@ -184,6 +191,7 @@ describe('@gl Test gl plot side effects', function() {
184
191
. then ( function ( ) {
185
192
expect ( d3 . selectAll ( 'canvas' ) . size ( ) ) . toEqual ( 0 ) ;
186
193
} )
194
+ . catch ( failTest )
187
195
. then ( done ) ;
188
196
} ) ;
189
197
You can’t perform that action at this time.
0 commit comments