Test driving your visualization - pixel-perfect bar rendering
In this iteration we will finally generate the bars using the data we have. Through our test cases we will make sure all bars are not only rendered but rendered with pixel-perfect precision.
Getting ready
Open your local copy of the following file in your text editor:
How to do it...
Let's see how we test it:
describe('chart body', function () { it('should create body g', function () { chart.render(); expect(chartBody()).not.toBeEmpty(); }); it('should translate to (left, top)', function () { chart.render(); expect(chartBody().attr('transform')). toBe('translate(30,10)') }); }); describe(&apos...