Skip to content

Track names used within a single test file #137

@schloerke

Description

@schloerke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions