Skip to content

Commit 6f90335

Browse files
committed
longer timeout for choropleth bundle test
hopefully avoid this particular spurious test failure...
1 parent 0d1709b commit 6f90335

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

test/jasmine/bundle_tests/choropleth_test.js

+16-6
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,34 @@ var PlotlyChoropleth = require('@lib/choropleth');
55

66
var createGraphDiv = require('../assets/create_graph_div');
77
var destroyGraphDiv = require('../assets/destroy_graph_div');
8+
var failTest = require('../assets/fail_test');
9+
10+
var LONG_TIMEOUT_INTERVAL = 5 * jasmine.DEFAULT_TIMEOUT_INTERVAL;
811

912

1013
describe('Bundle with choropleth', function() {
1114
'use strict';
1215

1316
Plotly.register(PlotlyChoropleth);
1417

18+
var gd;
19+
1520
var mock = require('@mocks/geo_multiple-usa-choropleths.json');
1621

17-
beforeEach(function(done) {
18-
Plotly.plot(createGraphDiv(), mock.data, mock.layout).then(done);
22+
beforeEach(function() {
23+
gd = createGraphDiv();
1924
});
2025

2126
afterEach(destroyGraphDiv);
2227

23-
it('should graph choropleth traces', function() {
24-
var nodes = d3.selectAll('g.trace.choropleth');
28+
it('should graph choropleth traces', function(done) {
29+
Plotly.plot(gd, mock.data, mock.layout)
30+
.then(function() {
31+
var nodes = d3.selectAll('g.trace.choropleth');
2532

26-
expect(nodes.size()).toEqual(4);
27-
});
33+
expect(nodes.size()).toEqual(4);
34+
})
35+
.catch(failTest)
36+
.then(done);
37+
}, LONG_TIMEOUT_INTERVAL);
2838
});

0 commit comments

Comments
 (0)