go-starter icon indicating copy to clipboard operation
go-starter copied to clipboard

Update the snapshot helper to be able to save raw json and parsed and validated response struct

Open mwieser opened this issue 2 years ago • 1 comments

Added a Save function to the snapshot helper which snapshots the (prettified) raw json response body first and then calls ParseResponseAndValidate and snapshots the parsed and validated struct.

Also enhanced the replacer when using Skip by supporting multiline skips for maps or slices.

mwieser avatar May 30 '22 12:05 mwieser

Codecov Report

Patch coverage: 76.00% and project coverage change: +0.39 :tada:

Comparison is base (d14d4b2) 62.86% compared to head (6fd1c13) 63.25%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #206      +/-   ##
==========================================
+ Coverage   62.86%   63.25%   +0.39%     
==========================================
  Files          78       78              
  Lines        6053     6088      +35     
==========================================
+ Hits         3805     3851      +46     
+ Misses       1635     1624      -11     
  Partials      613      613              
Impacted Files Coverage Δ
internal/test/helper_request.go 58.33% <72.72%> (+20.00%) :arrow_up:
internal/test/helper_snapshot.go 76.59% <76.92%> (-3.07%) :arrow_down:

... and 2 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar May 30 '22 12:05 codecov[bot]