You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #172, which contains lots of explanatory
writing to make this PR more approachable by those new to Pretender. Check that Issue out!
Pretender, hypothetically, can record and playback responses. It does this by persisting the responses to localstorage. This is incredibly handy for some use cases (performance regression testing) but unwieldy for others (unit testing network requests).
For use cases like unit testing network requests it would still be useful to allow developers to easily gather data from their servers without needing to hand-create. It would also be nice to throw those results away as the server responses shift over time and get new handlers.
Off the top of my head, I can imagine a console-based solution where, in recording mode, you emit something like:
Pretender Recorded: GET /foos/12. To store this for later use add this response to your maps:
this.get('/foos/12', function(){
return [000, { ... }, "{ ... }"];
});
Where 000, { ... } and "{ ... }" and the actual observed response code, headers, and body respectively.
A PR that addresses this issue:
adds an adapter that surfaces to the developer in some way, an observed response with instructions for how to manually update their Pretender maps to include a canned response for the observed request(s)
The text was updated successfully, but these errors were encountered:
Part of #172, which contains lots of explanatory
writing to make this PR more approachable by those new to Pretender. Check that Issue out!
Pretender, hypothetically, can record and playback responses. It does this by persisting the responses to localstorage. This is incredibly handy for some use cases (performance regression testing) but unwieldy for others (unit testing network requests).
For use cases like unit testing network requests it would still be useful to allow developers to easily gather data from their servers without needing to hand-create. It would also be nice to throw those results away as the server responses shift over time and get new handlers.
Off the top of my head, I can imagine a console-based solution where, in recording mode, you emit something like:
Where
000
,{ ... }
and"{ ... }"
and the actual observed response code, headers, and body respectively.A PR that addresses this issue:
The text was updated successfully, but these errors were encountered: