tests/testthat/test_dir/test-helper.R

# test that the companion helper script is sourced by test_dir
context("helper")

test_that("helper test", {
  expect_equal(hello(), "Hello World")
})
r-lib/testthat documentation built on April 19, 2019, 7:05 p.m.