inst/tests/ directory.
See test_dir for the naming convention of test
scripts within that directory.test(pkg = ".", filter = NULL, fresh = FALSE)as.package for more informationNULL, only tests with file
names matching this regular expression will be executed.
Matching will take on the file name after it has been
stripped of "test-" and ".r".TRUE, will be run in a fresh R session. This has
the advantage that there's no way the examples can depend on anything in
the current session, but interactive code (like browser)
won't work.add_test_infrastructure for more details.