Skip to content

Commit a8a3ee5

Browse files
Add missing catch to test to retrieve the tracebacks
1 parent dd48914 commit a8a3ee5

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

test/jasmine/tests/range_slider_test.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var createGraphDiv = require('../assets/create_graph_div');
1111
var destroyGraphDiv = require('../assets/destroy_graph_div');
1212
var mouseEvent = require('../assets/mouse_event');
1313
var supplyAllDefaults = require('../assets/supply_defaults');
14+
var failTest = require('../assets/fail_test');
1415

1516
var TOL = 6;
1617

@@ -95,7 +96,9 @@ describe('the range slider', function() {
9596
expect(gd.layout.xaxis.range).toBeCloseToArray([4, 49], -0.5);
9697
expect(maskMin.getAttribute('width')).toEqual(String(diff));
9798
expect(handleMin.getAttribute('transform')).toBe('translate(' + (diff - 2.5) + ',0.5)');
98-
}).then(done);
99+
})
100+
.catch(failTest)
101+
.then(done);
99102
});
100103

101104
it('should react to resizing the maximum handle', function(done) {
@@ -114,7 +117,9 @@ describe('the range slider', function() {
114117
expect(+maskMax.getAttribute('width')).toBeCloseTo(-diff);
115118

116119
testTranslate1D(handleMax, dataMaxStart + diff);
117-
}).then(done);
120+
})
121+
.catch(failTest)
122+
.then(done);
118123
});
119124

120125
it('should react to moving the slidebox left to right', function(done) {
@@ -132,7 +137,9 @@ describe('the range slider', function() {
132137
expect(gd.layout.xaxis.range).toBeCloseToArray([3.96, 49], -0.5);
133138
expect(+maskMin.getAttribute('width')).toBeCloseTo(String(diff));
134139
testTranslate1D(handleMin, dataMinStart + diff - 3);
135-
}).then(done);
140+
})
141+
.catch(failTest)
142+
.then(done);
136143
});
137144

138145
it('should react to moving the slidebox right to left', function(done) {
@@ -150,7 +157,9 @@ describe('the range slider', function() {
150157
expect(gd.layout.xaxis.range).toBeCloseToArray([0, 45.04], -0.5);
151158
expect(+maskMax.getAttribute('width')).toBeCloseTo(-diff);
152159
testTranslate1D(handleMax, dataMaxStart + diff);
153-
}).then(done);
160+
})
161+
.catch(failTest)
162+
.then(done);
154163
});
155164

156165
it('should resize the main plot when rangeslider has moved', function(done) {
@@ -186,6 +195,7 @@ describe('the range slider', function() {
186195
testTranslate1D(handleMin, 123.32);
187196
testTranslate1D(handleMax, 252.65);
188197
})
198+
.catch(failTest)
189199
.then(done);
190200
});
191201

@@ -201,6 +211,7 @@ describe('the range slider', function() {
201211
testTranslate1D(handleMin, 123.32);
202212
testTranslate1D(handleMax, 617);
203213
})
214+
.catch(failTest)
204215
.then(done);
205216
});
206217

0 commit comments

Comments
 (0)