somewhatabstract/checksync

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

Open

#2,054 创建于 2025年3月7日

在 GitHub 查看
 (0 评论) (0 反应) (1 负责人)TypeScript (2 fork)github user discovery
enhancementgood first issue

仓库指标

Star
 (20 star)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南