8  Tests

8.1 Organisation

The organisation of test files should match the organisation of R/ files: if a function lives in R/foofy.R, then its tests should live in tests/testthat/test-foofy.R.

Use usethis::use_test() to automatically create a file with the correct name.

The file name will be displayed in output in order to get context.