diffplug / diffplug/selfie

Confusing when a got-away-with-it multiple snapshot stops getting away with it

Ouverte
#488 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug jvm
Langage dominant
Kotlin
Étoiles
101
Forks
18
Métriques de merge des PR
Aucune PR mergée en 30 j

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez dans jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/guts/WriteTracker.kt autour des lignes 70-94, où l’erreur signalée est assemblée. Vérifiez comment hotToFix et allow_multiple_equivalent_writes_to_one_location y sont représentés ; c’est terminé lorsque l’erreur présente hotToFix en premier et indique la propriété.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
kotlin
Domaine
testing
Type d'issue
Fonctionnalité
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.