Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track names used within a single test file #137

Open
schloerke opened this issue Mar 14, 2022 · 1 comment · May be fixed by #148
Open

Track names used within a single test file #137

schloerke opened this issue Mar 14, 2022 · 1 comment · May be fixed by #148
Labels
enhancement New feature or request wontfix This will not be worked on
Milestone

Comments

@schloerke
Copy link
Collaborator

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
@schloerke schloerke added the enhancement New feature or request label Mar 14, 2022
@schloerke schloerke added this to the v0.0.1 milestone Mar 14, 2022
@schloerke schloerke linked a pull request Mar 21, 2022 that will close this issue
@schloerke schloerke modified the milestones: v0.0.1, future Mar 29, 2022
@schloerke
Copy link
Collaborator Author

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

@schloerke schloerke added the wontfix This will not be worked on label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant