@@ -3,10 +3,11 @@ var createGraphDiv = require('../assets/create_graph_div');
33var destroyGraphDiv = require ( '../assets/destroy_graph_div' ) ;
44var textchartMock = require ( '@mocks/text_chart_arrays.json' ) ;
55
6+ var LONG_TIMEOUT_INTERVAL = 2 * jasmine . DEFAULT_TIMEOUT_INTERVAL ;
7+
68describe ( 'Plotly.downloadImage' , function ( ) {
79 'use strict' ;
810 var gd ;
9- var originalTimeout ;
1011
1112 // override click handler on createElement
1213 // so these tests will not actually
@@ -27,16 +28,10 @@ describe('Plotly.downloadImage', function() {
2728
2829 beforeEach ( function ( ) {
2930 gd = createGraphDiv ( ) ;
30-
31- // downloadImage can take a little longer
32- // so give it a little more time to finish
33- originalTimeout = jasmine . DEFAULT_TIMEOUT_INTERVAL ;
34- jasmine . DEFAULT_TIMEOUT_INTERVAL = 10000 ;
3531 } ) ;
3632
3733 afterEach ( function ( ) {
3834 destroyGraphDiv ( ) ;
39- jasmine . DEFAULT_TIMEOUT_INTERVAL = originalTimeout ;
4035 } ) ;
4136
4237 it ( 'should be attached to Plotly' , function ( ) {
@@ -45,11 +40,11 @@ describe('Plotly.downloadImage', function() {
4540
4641 it ( 'should create link, remove link, accept options' , function ( done ) {
4742 downloadTest ( gd , 'jpeg' , done ) ;
48- } ) ;
43+ } , LONG_TIMEOUT_INTERVAL ) ;
4944
5045 it ( 'should create link, remove link, accept options' , function ( done ) {
5146 downloadTest ( gd , 'png' , done ) ;
52- } ) ;
47+ } , LONG_TIMEOUT_INTERVAL ) ;
5348
5449 it ( 'should create link, remove link, accept options' , function ( done ) {
5550 checkWebp ( function ( supported ) {
@@ -59,12 +54,11 @@ describe('Plotly.downloadImage', function() {
5954 done ( ) ;
6055 }
6156 } ) ;
62-
63- } ) ;
57+ } , LONG_TIMEOUT_INTERVAL ) ;
6458
6559 it ( 'should create link, remove link, accept options' , function ( done ) {
6660 downloadTest ( gd , 'svg' , done ) ;
67- } ) ;
61+ } , LONG_TIMEOUT_INTERVAL ) ;
6862} ) ;
6963
7064
0 commit comments