-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
backlogThe issue has been put on the back burnerThe issue has been put on the back burnerenhancementNew feature or requestNew feature or request
Milestone
Description
From #13:
For your issue of wanting to test your processing code with a formal unit test, your intuition is right on. The way people like to do this is to make what's called a mock. It's basically what you said: save a copy of some response to some function call that usually is slow/can fail/etc and test that. This makes unit test unit tests and not integration tests!
I haven't done this directly with testthat, but there appears to be support: https://github.com/r-lib/testthat/blob/master/R/mock.R. Also see https://www.mango-solutions.com/blog/testing-without-the-internet-using-mock-functions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backlogThe issue has been put on the back burnerThe issue has been put on the back burnerenhancementNew feature or requestNew feature or request