tests/testthat/test-app.R

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

Try the presser package in your browser

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

presser documentation built on July 1, 2020, 5:49 p.m.