ericclemmons / ericclemmons/node-recorder

Keep existing fixtures without re-writing them?

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
97
Forks
3
PR merge metrics
No merged PRs in 30d

Description

When working on `recording.config.js`' `normalize` function, especially via trial & error, it sucks that the same fixture keys are no longer valid because of hashing mechanisms.

(That's why I wonder if it's better to have a hashing mechanism that doesn't change often, but that's basically what `normalize` is)

One opportunity is to read all existing fixtures & normalize them when the expected one can't be found, then see if they match up.

(Basically keeping a giant map in memory, but this seems like a bad idea)

The downside to this is that, without that determinism, new recordings will generate new hashes (since you're fine-tuning the `normalize` function).

Maybe instead there could be a `PRUNE` mode, which is basically `REPLAY` but prunes any unused recordings?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.