RMI-PACTA / pacta.data.scraping

Scrapes data from various web sources needed for PACTA
https://rmi-pacta.github.io/pacta.data.scraping
Other
2 stars 0 forks source link

Implement testing with mocking #34

Open jdhoffa opened 5 months ago

jdhoffa commented 5 months ago

Implement robust testing for these functions with a mocking package to prevent frequent failures due to frequent hiccups with internet access and web server responses.

related: https://github.com/RMI-PACTA/pacta.data.preparation/issues/167

great resource: https://books.ropensci.org/http-testing/index.html

using one of (in no particular order): https://docs.ropensci.org/vcr/ https://docs.ropensci.org/webmockr/ https://enpiar.com/r/httptest/ https://enpiar.com/httptest2/ https://webfakes.r-lib.org

jdhoffa commented 5 months ago

Thanks @cjyetman