To answer your question, I do not think it can be defined otherwise than by the corresponding alphanumeric name of your test-*.R files.
From the source testthat , this is the function that test_package calls through test_dir to get the tests:
find_test_scripts <- function(path, filter = NULL, invert = FALSE, ...) { files <- dir(path, "^test.*\\.[rR]$", full.names = TRUE)
What is wrong if you just solve the difficult task in the first place?
Jack wassey
source share