Closed KayleighYum closed 11 months ago
@KayleighYum Thank you very much for your PR! It is a good improvement for kassette. I have left some comments about the things I think should or could be changed before integrating this new feature.
Thanks @divdavem! I'll take a look at the comments
@divdavem I have fixed the issue with the failing api doc generation. Apologies about that
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
ce30f1d
) 91.52% compared to head (9a8e4a8
) 91.64%. Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi @KayleighYum ! Thank you very much for the changes you have already made following my comments and to fix the build failure. If it is ok for you, I have added some more comments to improve the code before we can integrate it. Thank you!
Hey @divdavem I've made the adjustments based on your feedback, please can you resolve the conversations if you're happy with the changes or let me know if I've missed anything
@KayleighYum Thank you very much for your PR! It is now integrated. :tada: We will release a new kassette version on npm soon. If you have any feedback about kassette, and how you use it, we are always happy to hear about it.
A new configuration option has been added,
saveStringBodies
, which is set to true by default. This can be changed with the newsetSaveStringBodies
method. A new parameter has been added totoHarPostData
andtoHarContent
wheresaveStringBodies
will be passed in.When
saveStringBodies
is set to false and the mimeType of the request/response is application/json the body will be json parsed and saved.This will only be applied when the
mockFormat
is 'HAR'. This will be applied to both request (whensaveInputRequestBody
is true) and response bodies.