You can read the original post in its original format on Rtask website by ThinkR here: Mock Them All: Simulate to Better Test with testthat
Unit testing in R. You know, those small functions that ensure your code works flawlessly—even when you’re on vacation or writing new modules …