@@ -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