R/webmockr_reset.R

Defines functions webmockr_reset

Documented in webmockr_reset

#' @title webmockr_reset
#' @description Clear all stubs and the request counter
#' @export
#' @return nothing
#' @seealso [stub_registry_clear()] [request_registry_clear()]
#' @details this function runs [stub_registry_clear()] and
#' [request_registry_clear()] - so you can run those two yourself
#' to achieve the same thing
#' @examples
#' # webmockr_reset()
webmockr_reset <- function() {
  stub_registry_clear()
  request_registry_clear()
  invisible(NULL)
}

Try the webmockr package in your browser

Any scripts or data that you put into this service are public.

webmockr documentation built on March 7, 2023, 5:25 p.m.