Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 3 commits into from

Conversation

mwieser
Copy link
Member

@mwieser mwieser commented May 30, 2022

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.

… validated response struct.

adapted the replacer function to support multiline skips for maps or slices
@mwieser mwieser requested a review from majodev May 30, 2022 12:04
@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Attention: Patch coverage is 76.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 63.25%. Comparing base (d14d4b2) to head (6fd1c13).
Report is 70 commits behind head on master.

Files with missing lines Patch % Lines
internal/test/helper_snapshot.go 76.92% 5 Missing and 4 partials ⚠️
internal/test/helper_request.go 72.72% 3 Missing ⚠️
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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mwieser mwieser requested a review from anjankow May 10, 2023 08:41
@eklatzer
Copy link
Collaborator

The changes of this PR are already integrated in the code base so I will close the PR

@eklatzer eklatzer closed this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants