Introduce unit test based on image comparison (#3988)
Attempt to make easier the creation of unit tests that check the drawing output. Until now, this was done by checking calls on a 'fake' context, which is hard to maintain (need to update pixel values by hands) and also not reliable when optimizing code (i.e. different calls sequence but same result). As of now, it's possible to define 'auto' tests based on JSON/PNG fixtures: chart is generated from the JSON file and compared to the associated PNG image. The image diff is done using `pixelmatch`. As an example (and in preparation of the `filler` plugin), add auto tests for the line element `fill` options.
S
Simon Brunel committed
1ca0ffb5d5b6c2072176fd36fa85a58c483aa434
Parent: c216c0a
Committed by Tanner Linsley <tannerlinsley@gmail.com>
on 3/5/2017, 4:49:12 PM