Skip to content

Track names used within a single test file #137

Closed

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

Activity

  1. added
    enhancement
    on Mar 14, 2022
  2. added this to the v0.0.1 milestone on Mar 14, 2022
  3. modified the milestones: v0.0.1, future on Mar 29, 2022
  4. schloerke commented on Mar 30, 2022

    @schloerke
    CollaboratorAuthor

    Marking this issue as wontfix as there is no good fix but to fix it upstream in {testthat}

  5. added
    wontfix
    on Mar 30, 2022
  6. schloerke commented on Nov 18, 2025

    @schloerke
    CollaboratorAuthor
  7. removed
    wontfix
    on Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions