b-rodrigues / chronicler

https://b-rodrigues.github.io/chronicler/
GNU General Public License v3.0
48 stars 4 forks source link

Unit testing record ggplot #13

Open b-rodrigues opened 1 year ago

b-rodrigues commented 1 year ago

It'd be great to unit test record ggplot

but testing plots is not easy. Maybe a snapshot test? See https://testthat.r-lib.org/articles/snapshotting.html

b-rodrigues commented 1 year ago

Since a ggplot is a list, maybe we could save the list as an rds file and expect_equal the save list from the rds with the freshly generated one? Could be easy