somewhatabstract / somewhatabstract/checksync

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

Open
#2,054 0 comments 0 reactions 1 assignee View on GitHub

@somewhatabstract is already working on this.

Since Mar 7, 2025.

enhancement good first issue
Dominant language
TypeScript
Stars
20
Forks
3
Avg merge
25m
Merged PRs (30d)
21

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.