Confusing when a got-away-with-it multiple snapshot stops getting away with it
- Dominant language
- Kotlin
- Stars
- 101
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Story:
- a user has a test where they are taking multiple snapshots that have the same name
- such as calling `toMatchDisk()` twice in one test
- the snapshots happen to be the same, so they get away with it
- something about the code being tested changes, and now the snapshots are different, so the test fails with this error message
- https://github.com/diffplug/selfie/blob/edb5f659760d5a0760810f5bedd89c44fa6a5b0f/jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/guts/WriteTracker.kt#L70-L94
- [ ] The `hotToFix` is completely buried. It should come first!
- [ ] We should also advertise the `allow_multiple_equivalent_writes_to_one_location` property
Contributor guide
Research direction
Start in jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/guts/WriteTracker.kt around lines 70-94, where the reported error is assembled. Check how hotToFix and allow_multiple_equivalent_writes_to_one_location are represented there; done means the error presents hotToFix first and advertises the property.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100