Skip to content

Commit

Permalink
test: Fixed non-deterministic terminal output
Browse files Browse the repository at this point in the history
  • Loading branch information
achannarasappa committed Jan 25, 2021
1 parent 3f5d3b1 commit 2805185
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ui/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ var _ = Describe("Util", func() {
It("should generate text with a background and foreground color", func() {
inputStyleFn := NewStyle("#ffffff", "#000000", false)
output := inputStyleFn("test")
Expect(output).To(Equal("\x1b[38;5;231;48;5;16mtest\x1b[0m"))
Expect(output).To(ContainSubstring("test\x1b[0m"))
})
It("should generate text with bold styling", func() {
inputStyleFn := NewStyle("#ffffff", "#000000", true)
output := inputStyleFn("test")
Expect(output).To(Equal("\x1b[38;5;231;48;5;16;1mtest\x1b[0m"))
Expect(output).To(ContainSubstring("test\x1b[0m"))
})
})
})

0 comments on commit 2805185

Please sign in to comment.