As part of a larger feature, we need the ability to record the responses of "passthrough" requests into a storage mechanism that persists between page loads.
You should absolutely borrow heavily from prior art when design these interfaces.
PRs that help close this issue will:
[ ] add an option to pretender to record requests to localstorage
[ ] allow two recordings of the same verb/url
[ ] warn if recordings already exist and you're attempting record again
[ ] but also allow subsequent recordings to augment previous ones in the developer so chooses!
[ ] carefully consider the storage format for responses so that they can be "ejected" into multiple formats in the future.
[ ] finally, allow subsequent requests to respond with pre-recorded values
[ ] and, of course, a way to easily blow the whole recording away and start over!
Bonus points for making this code isolated enough that it can be extracted or replaced with another implementation that has the same interface.
Part of https://github.com/pretenderjs/pretender/issues/172, which contains lots of explanatory writing to make this PR more approachable by those new to Pretender. Check that Issue out!
As part of a larger feature, we need the ability to record the responses of "passthrough" requests into a storage mechanism that persists between page loads.
You should absolutely borrow heavily from prior art when design these interfaces.
PRs that help close this issue will:
Bonus points for making this code isolated enough that it can be extracted or replaced with another implementation that has the same interface.