test_that("no spelling errors in package docs, README, or slides", { skip_on_cran() skip_if_not_installed("spelling") pkg_root <- getwd() for (i in seq_len(5)) { if (file.exists(file.path(pkg_root, "DESCRIPTION"))) break pkg_root <- dirname(pkg_root) } skip_if(!file.exists(file.path(pkg_root, "DESCRIPTION"))) errors <- spelling::spell_check_package(pkg_root) expect_equal(nrow(errors), 0L, info = paste(errors$word, collapse = ", ")) })