somewhatabstract/checksync

Use jest-specific-snapshot or some other mechanism to make integration test snapshots easier to manage

Open

#2 054 ouverte le 7 mars 2025

Voir sur GitHub
 (0 commentaires) (0 réactions) (1 assigné)TypeScript (2 forks)github user discovery
enhancementgood first issue

Métriques du dépôt

Stars
 (20 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

Currently, we add all our integration test snapshots into one big file. It's getting unmanageable for code reviews when things change like we add new examples, or modify our logged output.

It would be helpful to move each snapshot to its own file. Since we autogenerate the test cases based off the examples on disk, it's not so easy to just have one test file per example, or per scenario per example - we would need to autogenerate the test files themselves. That feels messy.

Instead, if we can just override where jest writes a snapshot, then we can tidy things up. https://github.com/igor-dv/jest-specific-snapshot allows for this.

We may need to do our own snapshot deletion code if an example is deleted or something, since I'm not sure just updating snapshots will tidy-up unused snapshots written this way, but that's manageable and a better situation than the ever growing integration test snapshots file.

Guide contributeur