@@ -1109,7 +1109,7 @@ describe('Test histogram', function() {
1109
1109
1110
1110
afterEach ( destroyGraphDiv ) ;
1111
1111
1112
- it ( 'should update autobins correctly when restyling' , function ( ) {
1112
+ it ( 'should update autobins correctly when restyling' , function ( done ) {
1113
1113
// note: I'm *not* testing what this does to gd.data, as that's
1114
1114
// really a matter of convenience and will perhaps change later (v2?)
1115
1115
var data1 = [ 1.5 , 2 , 2 , 3 , 3 , 3 , 4 , 4 , 5 ] ;
@@ -1168,10 +1168,12 @@ describe('Test histogram', function() {
1168
1168
. then ( function ( ) {
1169
1169
expect ( gd . _fullData [ 0 ] . xbins ) . toEqual ( { start : 9 , end : 51 , size : 2 } ) ;
1170
1170
expect ( gd . _fullData [ 0 ] . nbinsx ) . toBeUndefined ( ) ;
1171
- } ) ;
1171
+ } )
1172
+ . catch ( failTest )
1173
+ . then ( done ) ;
1172
1174
} ) ;
1173
1175
1174
- it ( 'respects explicit autobin: false as a one-time autobin' , function ( ) {
1176
+ it ( 'respects explicit autobin: false as a one-time autobin' , function ( done ) {
1175
1177
var data1 = [ 1.5 , 2 , 2 , 3 , 3 , 3 , 4 , 4 , 5 ] ;
1176
1178
Plotly . plot ( gd , [ { x : data1 , type : 'histogram' , autobinx : false } ] )
1177
1179
. then ( function ( ) {
@@ -1187,10 +1189,12 @@ describe('Test histogram', function() {
1187
1189
} )
1188
1190
. then ( function ( ) {
1189
1191
expect ( gd . _fullData [ 0 ] . xbins ) . toEqual ( { start : 1 , end : 6 , size : 1 } ) ;
1190
- } ) ;
1192
+ } )
1193
+ . catch ( failTest )
1194
+ . then ( done ) ;
1191
1195
} ) ;
1192
1196
1193
- it ( 'allows changing axis type with new x data' , function ( ) {
1197
+ it ( 'allows changing axis type with new x data' , function ( done ) {
1194
1198
var x1 = [ 1 , 1 , 1 , 1 , 2 , 2 , 2 , 3 , 3 , 4 ] ;
1195
1199
var x2 = [ '2017-01-01' , '2017-01-01' , '2017-01-01' , '2017-01-02' , '2017-01-02' , '2017-01-03' ] ;
1196
1200
@@ -1204,7 +1208,9 @@ describe('Test histogram', function() {
1204
1208
. then ( function ( ) {
1205
1209
expect ( gd . _fullLayout . xaxis . type ) . toBe ( 'date' ) ;
1206
1210
expect ( gd . _fullLayout . xaxis . range ) . toEqual ( [ '2016-12-31 12:00' , '2017-01-03 12:00' ] ) ;
1207
- } ) ;
1211
+ } )
1212
+ . catch ( failTest )
1213
+ . then ( done ) ;
1208
1214
} ) ;
1209
1215
1210
1216
it ( 'can resize a plot with several histograms' , function ( done ) {
0 commit comments