What is the best way to unit test (testthat
R package) graphs produced using ggplot2?
I will be using fixed data so will be validating input table dt to ggplot2 using equal.
I am aware that:
- unit tests need to be done in isolation
- we need to validate that data is passed correctly to ggplot?