Skip to content

fix(test): stub supports_kitty in autolink media-routing tests#17

Merged
delphinus merged 1 commit into
mainfrom
fix/autolink-test-skip-kitty-gate
May 15, 2026
Merged

fix(test): stub supports_kitty in autolink media-routing tests#17
delphinus merged 1 commit into
mainfrom
fix/autolink-test-skip-kitty-gate

Conversation

@delphinus
Copy link
Copy Markdown
Owner

Summary

  • The standalone-autolink tests added in feat(autolink): render <URL> inline and embed user-attachments media #13 expected image_placements to be populated, but that branch in content_builder is gated on image.supports_kitty(). CI runners (Ubuntu, no graphics-capable terminal) return false, so the tests failed there even though the routing logic is correct (locally on WezTerm/kitty they pass).
  • Stub image.supports_kitty for the duration of these tests, restored on exit even when the test errors. The negative test is stubbed too so it exercises the URL filter rather than passing for the wrong reason.

Test plan

  • make test locally (515 passed)
  • Locally simulated CI by forcing image.supports_kitty = function() return false end at module level before running the test file — still 40 passed in link_types_test.lua
  • Wait for CI green before merging

🤖 Generated with Claude Code

image_placements are only registered when image.supports_kitty()
returns true, which requires a Kitty graphics-capable terminal
(WezTerm/kitty/ghostty). CI runners report false, so the standalone
autolink tests added in #13 failed there even though the routing
logic itself is correct.

Stub image.supports_kitty for the duration of these tests with a
restore-on-error wrapper. The negative test is also stubbed so it
exercises the URL filter rather than passing for the wrong reason
(no placement because no kitty support).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@delphinus delphinus merged commit b8a4a36 into main May 15, 2026
4 checks passed
@delphinus delphinus deleted the fix/autolink-test-skip-kitty-gate branch May 15, 2026 06:48
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.

1 participant