Skip to content

Add regression test for SVG length unit conversion#121

Merged
swhitty merged 1 commit into
swhitty:mainfrom
rursache:fix/42-svg-length-units
Apr 22, 2026
Merged

Add regression test for SVG length unit conversion#121
swhitty merged 1 commit into
swhitty:mainfrom
rursache:fix/42-svg-length-units

Conversation

@rursache
Copy link
Copy Markdown
Contributor

Summary

  • Adds a test verifying SVG root width/height attributes with units (cm, in) are correctly converted to pixels
  • The unit conversion was already implemented (10cm → 377px, 2in → 192px) but lacked a specific test for SVG root element parsing

Test plan

  • Added svgWithUnits() test verifying width="10cm" → 377 and height="2in" → 192
  • All 194 tests pass

Relates to #42

Unit conversion for SVG root width/height attributes already works
correctly (10cm → 377px, 2in → 192px). Adding regression test.

Relates to #42
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.42%. Comparing base (6238058) to head (6305b70).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #121      +/-   ##
==========================================
+ Coverage   89.02%   89.42%   +0.40%     
==========================================
  Files         159      159              
  Lines       11959    15399    +3440     
==========================================
+ Hits        10646    13770    +3124     
- Misses       1313     1629     +316     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@swhitty swhitty merged commit 15bfea5 into swhitty:main Apr 22, 2026
11 checks passed
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