@@ -11,7 +11,6 @@ var destroyGraphDiv = require('../assets/destroy_graph_div');
1111var selectButton = require ( '../assets/modebar_button' ) ;
1212var failTest = require ( '../assets/fail_test' ) ;
1313
14-
1514describe ( 'ModeBar' , function ( ) {
1615 'use strict' ;
1716
@@ -960,10 +959,11 @@ describe('ModeBar', function() {
960959 Plotly . plot ( gd , { data : [ ] , layout : { } } )
961960 . then ( function ( ) {
962961 selectButton ( gd . _fullLayout . _modeBar , 'toImage' ) . click ( ) ;
963- expect ( Registry . call ) . toHaveBeenCalledWith ( 'downloadImage' , gd ,
964- { format : 'png' } ) ;
965- done ( ) ;
966- } ) ;
962+ expect ( Registry . call )
963+ . toHaveBeenCalledWith ( 'downloadImage' , gd , { format : 'png' } ) ;
964+ } )
965+ . catch ( failTest )
966+ . then ( done ) ;
967967 } ) ;
968968
969969 it ( 'should accept overriding defaults' , function ( done ) {
@@ -973,13 +973,14 @@ describe('ModeBar', function() {
973973 filename : 'x' ,
974974 unsupported : 'should not pass'
975975 }
976- } } )
976+ } } )
977977 . then ( function ( ) {
978978 selectButton ( gd . _fullLayout . _modeBar , 'toImage' ) . click ( ) ;
979- expect ( Registry . call ) . toHaveBeenCalledWith ( 'downloadImage' , gd ,
980- { format : 'svg' , filename : 'x' } ) ;
981- done ( ) ;
982- } ) ;
979+ expect ( Registry . call )
980+ . toHaveBeenCalledWith ( 'downloadImage' , gd , { format : 'svg' , filename : 'x' } ) ;
981+ } )
982+ . catch ( failTest )
983+ . then ( done ) ;
983984 } ) ;
984985 } ) ;
985986
0 commit comments