forked from plotly/plotly.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontour_test.js
34 lines (22 loc) · 902 Bytes
/
contour_test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var d3SelectAll = require('../../strict-d3').selectAll;
var Plotly = require('../../../lib/core');
var PlotlyContour = require('../../../lib/contour');
var createGraphDiv = require('../assets/create_graph_div');
var destroyGraphDiv = require('../assets/destroy_graph_div');
describe('Bundle with contour', function() {
'use strict';
Plotly.register(PlotlyContour);
var mock = require('../../image/mocks/contour_scatter.json');
beforeEach(function(done) {
Plotly.newPlot(createGraphDiv(), mock.data, mock.layout).then(done);
});
afterEach(destroyGraphDiv);
it('should graph scatter traces', function() {
var nodes = d3SelectAll('g.trace.scatter');
expect(nodes.size()).toEqual(1);
});
it('should graph contour traces', function() {
var nodes = d3SelectAll('g.contour');
expect(nodes.size()).toEqual(1);
});
});