chronicler icon indicating copy to clipboard operation
chronicler copied to clipboard

Unit testing record ggplot

Open b-rodrigues opened this issue 1 year ago • 1 comments

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 avatar Mar 25 '23 11:03 b-rodrigues

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

b-rodrigues avatar Mar 25 '23 11:03 b-rodrigues