Skip to content

Commit

Permalink
feat(color): added color.ToStyle()
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Jan 5, 2023
1 parent 9b6f0f3 commit 53a891d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions color_test.go
Expand Up @@ -152,7 +152,13 @@ func TestColorPrinterPrintMethods(t *testing.T) {
}

func TestNewStyle(t *testing.T) {
s := pterm.NewStyle(pterm.FgRed, pterm.BgBlue, pterm.Bold)
testza.AssertEqual(t, s, &pterm.Style{pterm.FgRed, pterm.BgBlue, pterm.Bold})
}

func TestColor_ToStyle(t *testing.T) {
s := pterm.FgCyan.ToStyle()
testza.AssertEqual(t, s, &pterm.Style{pterm.FgCyan})
}

func TestStyle_Add(t *testing.T) {
Expand Down

0 comments on commit 53a891d

Please sign in to comment.