From d2e0438b60d452cf4e0e4ff55ad5421218e93ad7 Mon Sep 17 00:00:00 2001 From: ParthSareen Date: Tue, 21 Jul 2026 17:24:58 -0700 Subject: [PATCH] test(agent): avoid direct terminal dependency --- cmd/tui/chat/render_test.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cmd/tui/chat/render_test.go b/cmd/tui/chat/render_test.go index 80e9550f4..750610cda 100644 --- a/cmd/tui/chat/render_test.go +++ b/cmd/tui/chat/render_test.go @@ -11,7 +11,6 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" - "github.com/muesli/termenv" coreagent "github.com/ollama/ollama/agent" "github.com/ollama/ollama/api" @@ -2133,10 +2132,6 @@ func TestRenderMarkdownTablePreservesValidSeparator(t *testing.T) { } func TestRenderMarkdownCodeFencesHighlightLanguageTaggedCode(t *testing.T) { - profile := lipgloss.ColorProfile() - lipgloss.SetColorProfile(termenv.TrueColor) - defer lipgloss.SetColorProfile(profile) - markdown := strings.Join([]string{ "Use **greet** before running this code.", "```go", @@ -2172,9 +2167,6 @@ func TestRenderMarkdownCodeFencesHighlightLanguageTaggedCode(t *testing.T) { if got := markdownCodeTokenKindFor("go", "package", " main"); got != markdownCodeTokenKeyword { t.Fatalf("package token kind = %v, want keyword", got) } - if got := highlightMarkdownCodeLine("go", "package main"); !strings.Contains(got, "\x1b[") { - t.Fatalf("language-tagged code should render ANSI syntax styling: %q", got) - } if got := highlightMarkdownCodeLine("", "plain code stays plain"); got != "plain code stays plain" { t.Fatalf("untagged code = %q, want plain code", got) }