Plan for test failure

If you are testing correctly you should be able to:

  1. Start from a new R session.
  2. Call devtools::load_all() which loads all defined below R/.
  3. Run an individual test or walk through it line-by-line
# dozens or hundreds of lines of self-sufficient, self-contained tests,
# all of which you can safely ignore!

test_that("f() works", {
  useful_thing <- ...
  x <- somePkg::someFunction(useful_thing)
  expect_equal(f(x), 2.5)