()
| 42 | |
| 43 | it('should not try to delete non existent stacks', function() { |
| 44 | function createAndUpdateChart() { |
| 45 | var chart = acquireChart({ |
| 46 | data: { |
| 47 | labels: ['q'], |
| 48 | datasets: [ |
| 49 | { |
| 50 | id: 'dismissed', |
| 51 | label: 'Test before', |
| 52 | yAxisID: 'count', |
| 53 | data: [816], |
| 54 | type: 'bar', |
| 55 | stack: 'stack' |
| 56 | } |
| 57 | ] |
| 58 | }, |
| 59 | options: { |
| 60 | scales: { |
| 61 | count: { |
| 62 | axis: 'y', |
| 63 | type: 'linear' |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | }); |
| 68 | |
| 69 | chart.data = { |
| 70 | datasets: [ |
| 71 | { |
| 72 | id: 'tests', |
| 73 | yAxisID: 'count', |
| 74 | label: 'Test after', |
| 75 | data: [38300], |
| 76 | type: 'bar' |
| 77 | } |
| 78 | ], |
| 79 | labels: ['q'] |
| 80 | }; |
| 81 | |
| 82 | chart.update(); |
| 83 | } |
| 84 | |
| 85 | expect(createAndUpdateChart).not.toThrow(); |
| 86 | }); |