refactor: Use testJSONBody helper for request body assertions in tests#4183
refactor: Use testJSONBody helper for request body assertions in tests#4183gmlewis merged 4 commits intogoogle:masterfrom
testJSONBody helper for request body assertions in tests#4183Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4183 +/- ##
=======================================
Coverage 93.69% 93.69%
=======================================
Files 210 210
Lines 19763 19763
=======================================
Hits 18517 18517
Misses 1049 1049
Partials 197 197 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This approach works well when a struct is passed directly to a method then to API without any modifications. However, if a method modifies the struct internally, a separate |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @Not-Dhananjay-Mishra!
Overall, I really prefer the outcome of this PR over #4170.
I see that both PRs were a great deal of work (thank you both for your time and effort to clean up all the cases so that we can thoroughly investigate this!) and the final state of this one looks much cleaner to me and in my opinion seems to create a better developer experience overall.
LGTM.
Thoughts, @alexandear ?
alexandear
left a comment
There was a problem hiding this comment.
Looks good to me.
Thank you for the tremendous amount of work.
I've left a few minor comments.
|
Please also update these Only |
|
Thanks @alexandear, for detailed review! |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @Not-Dhananjay-Mishra and @alexandear!
LGTM.
Merging.
An alternate implementation of #4170 that uses a generic
testJSONBodyhelper.