Since we are wrapping testthat::test_dir(), we can wrap testthat::test_dir(reporter=) which has access to reporter$start_file(file) / $end_file(file).
Idea:
- Wrap this reporter with a
{shinytest2} shim to capture the file value.
- When saving a snapshot file, check for the known names that have been seen if the reporter flag is set.
- Ignore if the flag is not set
Possible problems:
- Executing tests in parallel