tests/testthat/test-app.R

test_that("invalid handler", {
  app <- new_app()
  expect_error(
    app$use("foobar"),
    "Invalid webfakes handler"
  )
  expect_error(
    app$get("/foo", 1:100),
    "Invalid webfakes handler"
  )
})

Try the webfakes package in your browser

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

webfakes documentation built on May 29, 2024, 2:24 a.m.