fix(test): stub supports_kitty in autolink media-routing tests#17
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
image_placementsto be populated, but that branch incontent_builderis gated onimage.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).image.supports_kittyfor 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 testlocally (515 passed)image.supports_kitty = function() return false endat module level before running the test file — still 40 passed inlink_types_test.lua🤖 Generated with Claude Code