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

Open
wants to merge 3 commits into
base: master
Choose a base branch
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

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

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%) ⬆️
internal/test/helper_snapshot.go 76.59% <76.92%> (-3.07%) ⬇️

... and 2 files with indirect coverage changes

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

@mwieser mwieser requested a review from anjankow May 10, 2023 08:41
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.

2 participants