| 724 | |
| 725 | it('should generate the same ticks for explicit bounds with and without grace', function() { |
| 726 | function getTicks(grace) { |
| 727 | var chart = window.acquireChart({ |
| 728 | type: 'line', |
| 729 | data: { |
| 730 | labels: ['a', 'b'], |
| 731 | datasets: [{data: [10, 90]}] |
| 732 | }, |
| 733 | options: { |
| 734 | scales: { |
| 735 | y: {min: 0, max: 100, grace} |
| 736 | } |
| 737 | } |
| 738 | }); |
| 739 | return chart.scales.y.ticks.map(tick => tick.value); |
| 740 | } |
| 741 | |
| 742 | expect(getTicks('10%')).toEqual(getTicks(undefined)); |
| 743 | expect(getTicks(20)).toEqual(getTicks(undefined)); |