After the update to R 4.2.0, all tests using expect_doppelganger()
from vdiffr
fail with the following message:
Error in svglite_(filename, bg, width, height, pointsize, standalone, :
Graphics API version mismatch
How can I fix these tests?
Simply reinstalling the package vdiffr
resolved the issue. There was not even a change to the snapshot images used in the test.
More information regarding this update to the graphics engine can be found in this blog post, where it is stated that
For users of R packages that provide graphics devices, those packages will need to be reinstalled when updating to R 4.2.0.