Skip to content

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

@somewhatabstract

Description

@somewhatabstract

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.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions