Skip to content

Conversation

@vershwal
Copy link
Member

ref https://linear.app/ghost/issue/PRO-1513 https://linear.app/ghost/issue/PRO-1517

This PR adds the following edge case tests for transformReadyToAbsolute()

✅ Empty string → empty string
✅ null → null
✅ undefined -> empty string (normalized by default parameter)
✅ Malformed URL in content → graceful fallback
✅ Only media CDN set (files CDN = null):

  • /content/media/ → uses CDN
  • /content/files/ → uses site URL
  • /content/images/ → uses site URL

✅ Empty CDN config (urls.media = null) → all use site URL

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.62%. Comparing base (969c43b) to head (cc7d18d).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #712      +/-   ##
==========================================
- Coverage   86.46%   84.62%   -1.85%     
==========================================
  Files          75       33      -42     
  Lines        5335     3518    -1817     
  Branches      706      394     -312     
==========================================
- Hits         4613     2977    -1636     
+ Misses        715      536     -179     
+ Partials        7        5       -2     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vershwal vershwal requested a review from jloh November 27, 2025 05:12
Copy link
Member

@jloh jloh left a comment

Choose a reason for hiding this comment

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

Nice, LGTM!

@vershwal vershwal merged commit d01338d into main Nov 27, 2025
2 checks passed
@vershwal vershwal deleted the testTransformReadyToAbsolute branch November 27, 2025 05:17
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.

4 participants