Skip to content

Commit 121d171

Browse files
committed
update finance bundle tests
1 parent 5b6a7d5 commit 121d171

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/jasmine/bundle_tests/finance_test.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,27 @@ describe('Bundle with finance trace type', function() {
1313

1414
var mock = require('@mocks/finance_style.json');
1515

16-
it('should register the correct trace modules for the generated traces', function() {
16+
it('should not register transforms anymore', function() {
1717
var transformModules = Object.keys(Plotly.Plots.transformsRegistry);
1818

19-
expect(transformModules).toEqual(['ohlc', 'candlestick']);
19+
expect(transformModules).toEqual([]);
2020
});
2121

2222
it('should register the correct trace modules for the generated traces', function() {
2323
var traceModules = Object.keys(Plotly.Plots.modules);
2424

25-
expect(traceModules).toEqual(['scatter', 'box', 'ohlc', 'candlestick']);
25+
// scatter is registered no matter what
26+
// ohlc uses some parts of box by direct require but does not need to register it.
27+
expect(traceModules).toEqual(['scatter', 'ohlc', 'candlestick']);
2628
});
2729

2830
it('should graph ohlc and candlestick traces', function(done) {
2931

3032
Plotly.plot(createGraphDiv(), mock.data, mock.layout).then(function() {
3133
var gSubplot = d3.select('g.cartesianlayer');
3234

33-
expect(gSubplot.selectAll('g.trace.scatter').size()).toEqual(2);
34-
expect(gSubplot.selectAll('g.trace.boxes').size()).toEqual(2);
35+
expect(gSubplot.selectAll('g.trace.ohlc').size()).toEqual(1);
36+
expect(gSubplot.selectAll('g.trace.boxes').size()).toEqual(1);
3537

3638
destroyGraphDiv();
3739
done();

0 commit comments

Comments
 (0)