@@ -20,12 +20,11 @@ function countCanvases() {
2020 return d3 . selectAll ( 'canvas' ) . size ( ) ;
2121}
2222
23- jasmine . DEFAULT_TIMEOUT_INTERVAL = 5000 ;
24-
2523describe ( 'Test removal of gl contexts' , function ( ) {
2624 var gd ;
2725
2826 beforeEach ( function ( ) {
27+ jasmine . DEFAULT_TIMEOUT_INTERVAL = 5000 ;
2928 gd = createGraphDiv ( ) ;
3029 } ) ;
3130
@@ -98,6 +97,7 @@ describe('Test gl plot side effects', function() {
9897 var gd ;
9998
10099 beforeEach ( function ( ) {
100+ jasmine . DEFAULT_TIMEOUT_INTERVAL = 5000 ;
101101 gd = createGraphDiv ( ) ;
102102 } ) ;
103103
@@ -320,6 +320,7 @@ describe('Test gl2d plots', function() {
320320 var mock = require ( '@mocks/gl2d_10.json' ) ;
321321
322322 beforeEach ( function ( ) {
323+ jasmine . DEFAULT_TIMEOUT_INTERVAL = 5000 ;
323324 gd = createGraphDiv ( ) ;
324325 } ) ;
325326
@@ -1274,9 +1275,19 @@ describe('Test gl2d plots', function() {
12741275} ) ;
12751276
12761277describe ( 'Test scattergl autorange:' , function ( ) {
1277- afterEach ( destroyGraphDiv ) ;
1278-
12791278 describe ( 'should return the same value as SVG scatter for ~small~ data' , function ( ) {
1279+ var gd ;
1280+
1281+ beforeEach ( function ( ) {
1282+ jasmine . DEFAULT_TIMEOUT_INTERVAL = 5000 ;
1283+ gd = createGraphDiv ( ) ;
1284+ } ) ;
1285+
1286+ afterEach ( function ( ) {
1287+ Plotly . purge ( gd ) ;
1288+ destroyGraphDiv ( ) ;
1289+ } ) ;
1290+
12801291 var specs = [
12811292 { name : 'lines+markers' , fig : require ( '@mocks/gl2d_10.json' ) } ,
12821293 { name : 'bubbles' , fig : require ( '@mocks/gl2d_12.json' ) } ,
@@ -1287,7 +1298,6 @@ describe('Test scattergl autorange:', function() {
12871298
12881299 specs . forEach ( function ( s ) {
12891300 it ( '@gl - case ' + s . name , function ( done ) {
1290- var gd = createGraphDiv ( ) ;
12911301 var glRangeX ;
12921302 var glRangeY ;
12931303
@@ -1320,6 +1330,7 @@ describe('Test scattergl autorange:', function() {
13201330 var gd ;
13211331
13221332 beforeEach ( function ( ) {
1333+ jasmine . DEFAULT_TIMEOUT_INTERVAL = 5000 ;
13231334 gd = createGraphDiv ( ) ;
13241335 // to avoid expansive draw calls (which could be problematic on CI)
13251336 spyOn ( ScatterGl , 'plot' ) . and . callFake ( function ( gd ) {
@@ -1328,6 +1339,11 @@ describe('Test scattergl autorange:', function() {
13281339 } ) ;
13291340 } ) ;
13301341
1342+ afterEach ( function ( ) {
1343+ Plotly . purge ( gd ) ;
1344+ destroyGraphDiv ( ) ;
1345+ } ) ;
1346+
13311347 // threshold for 'fast' axis expansion routine
13321348 var N = 1e5 ;
13331349 var x = new Array ( N ) ;
0 commit comments