Skip to content

Commit

Permalink
fix: remove broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Aug 22, 2024
1 parent 5207631 commit 69eab51
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 322 deletions.
46 changes: 0 additions & 46 deletions color_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,6 @@ import (
"testing"
)

func TestSetColorProfile(t *testing.T) {
r := DefaultRenderer()
input := "hello"

tt := []struct {
name string
profile Profile
expected string
}{
{
"ascii",
Ascii,
"hello",
},
{
"ansi",
ANSI,
"\x1b[94mhello\x1b[m",
},
{
"ansi256",
ANSI256,
"\x1b[38;5;62mhello\x1b[m",
},
{
"truecolor",
TrueColor,
"\x1b[38;2;89;86;224mhello\x1b[m",
},
}

for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
r.SetColorProfile(tc.profile)
style := NewStyle().Foreground(Color("#5A56E0"))
res := style.Render(input)

if res != tc.expected {
t.Errorf("Expected:\n\n`%s`\n`%s`\n\nActual output:\n\n`%s`\n`%s`\n\n",
tc.expected, formatEscapes(tc.expected),
res, formatEscapes(res))
}
})
}
}

func TestHexToColor(t *testing.T) {
t.Parallel()

Expand Down
181 changes: 0 additions & 181 deletions renderer.go

This file was deleted.

53 changes: 0 additions & 53 deletions renderer_test.go

This file was deleted.

Loading

0 comments on commit 69eab51

Please sign in to comment.