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

test: Refactor tests using large single-line JSON strings #2559

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

chynesNR
Copy link
Member

This ended up being more tedious than expected. Using raw string literals makes the code much more readable, but the tests are expecting an exact match, and I couldn't just strip the whitespace because some values contain spaces. For that I added an "unformatting" helper function.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.60%. Comparing base (d51a54c) to head (c705409).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2559      +/-   ##
==========================================
- Coverage   80.61%   80.60%   -0.01%     
==========================================
  Files         459      459              
  Lines       28927    28927              
  Branches     3177     3177              
==========================================
- Hits        23319    23317       -2     
- Misses       4819     4821       +2     
  Partials      789      789              
Flag Coverage Δ
Agent 81.50% <ø> (-0.01%) ⬇️
Profiler 72.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

Copy link
Member

@tippmar-nr tippmar-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Should really help readability.

@chynesNR chynesNR merged commit d6e1324 into main Jun 17, 2024
93 checks passed
@chynesNR chynesNR deleted the test/refactor-long-json-strings branch June 17, 2024 16:50
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.

None yet

3 participants