tinytest¶
A lightweight, zero-dependency testing framework for R packages. Scrutin auto-detects tinytest when a DESCRIPTION file and an inst/tinytest/ directory are both present.
Installing tinytest¶
tinytest is not shipped with Scrutin. Install it from CRAN:
Directory structure¶
mypackage/
├── DESCRIPTION
├── NAMESPACE
├── R/
│ └── math.R
└── inst/
└── tinytest/
└── test_math.R
Minimal example¶
R/math.R
inst/tinytest/test_math.R
tinytest tests are plain R scripts with expect_* calls at the top level (no test_that() wrapper).
Running¶
Configuration¶
No configuration is required. To override defaults in .scrutin/config.toml:
Custom runner¶
scrutin init writes the default runner to .scrutin/runners/tinytest.R. Edit that file in place: the engine picks it up automatically whenever it exists. To point at a different path, set runner on an explicit suite: