|
| 1 | +var Plotly = require('@lib/core'); |
| 2 | + |
| 3 | +Plotly.register([ |
| 4 | + require('@lib/bar'), |
| 5 | + require('@lib/box'), |
| 6 | + require('@lib/heatmap'), |
| 7 | + require('@lib/histogram'), |
| 8 | + require('@lib/histogram2d'), |
| 9 | + require('@lib/histogram2dcontour'), |
| 10 | + require('@lib/pie'), |
| 11 | + require('@lib/contour'), |
| 12 | + require('@lib/scatterternary'), |
| 13 | + require('@lib/ohlc'), |
| 14 | + require('@lib/candlestick') |
| 15 | +]); |
| 16 | + |
| 17 | +var createGraphDiv = require('../assets/create_graph_div'); |
| 18 | +var destroyGraphDiv = require('../assets/destroy_graph_div'); |
| 19 | + |
| 20 | +describe('Bundle with IE9 supported trace types:', function() { |
| 21 | + |
| 22 | + afterEach(destroyGraphDiv); |
| 23 | + |
| 24 | + it(' check that ie9_mock.js did its job', function() { |
| 25 | + expect(function() { return ArrayBuffer; }) |
| 26 | + .toThrow(new ReferenceError('ArrayBuffer is not defined')); |
| 27 | + expect(function() { return Uint8Array; }) |
| 28 | + .toThrow(new ReferenceError('Uint8Array is not defined')); |
| 29 | + }); |
| 30 | + |
| 31 | + it('heatmaps with smoothing should work', function(done) { |
| 32 | + var gd = createGraphDiv(); |
| 33 | + var data = [{ |
| 34 | + type: 'heatmap', |
| 35 | + z: [[1, 2, 3], [2, 1, 2]], |
| 36 | + zsmooth: 'best' |
| 37 | + }]; |
| 38 | + |
| 39 | + Plotly.plot(gd, data).then(done); |
| 40 | + }); |
| 41 | + |
| 42 | +}); |
0 commit comments