@@ -1,6 +1,7 @@
11package common
22
33import (
4+ "strings"
45 "testing"
56
67 "github.com/charmbracelet/crush/internal/ui/styles"
@@ -13,11 +14,13 @@ func TestFormatTokensAndCostPrefixesEstimatedUsage(t *testing.T) {
1314
1415 sty := styles.CharmtonePantera()
1516
16− actual := ansi.Strip(formatTokensAndCost(&sty, 120, 1000, 0, true))
17+ rendered := formatTokensAndCost(&sty, 120, 1000, 0, true)
18+ actual := ansi.Strip(rendered)
1719
1820 require.Contains(t, actual, "~12%")
1921 require.Contains(t, actual, "(120)")
2022 require.Contains(t, actual, "$0.00")
23+ require.True(t, strings.Contains(rendered, sty.ModelInfo.TokenPercentage.Render("~12%")))
2124}
2225
2326func TestFormatTokensAndCostOmitsEstimatedPrefix(t *testing.T) {