Description
Is the feature request related to a problem
In the Datadog APM tracer, we are using Verify with snapshots to verify a request is traced correctly. We run in two distinct modes, CallSite and CallTarget, and as such have separate tests for these. However, both tests should give the same output.
Verify enforces that each test uses a unique snapshot. That means we currently have duplicate snapshots for our tests, that could easily be consolidated, as half of them are identical.
Describe the solution
Providing a toggle to allow disabling of the uniqueness requirement for given test paths. I think this could be added as part of the UniqueFor
API without too much friction?
Describe alternatives considered
Continuing to have many duplicate files (our existing solution), hard links between files (more hassle than it's worth)
Additional context
Thanks for the library! 🙇
Activity
SimonCropp commentedon Oct 13, 2021
@andrewlock yep happy to add this. not sure if it should be at the
UniqueFor
level. since the use case could be when people are not even using theUniqueFor
api. how about top level setting (static and instance?sandrewlock commentedon Oct 14, 2021
That's great, thanks @SimonCropp! Yes, that makes more sense I think.
I'm happy to work up a PR, or would you prefer to do it? Thanks again!
SimonCropp commentedon Oct 14, 2021
sure. have a go at a pr. note i have moved to vs2022. if that is a complication i can handle the change