Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
printer: add tests for check to if json output clears buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
isacikgoz committed Mar 16, 2020
1 parent 84cfea8 commit 9ad4704
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions printer/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestFlush(t *testing.T) {

Flush()
assert.Equal(t, "[\n \"test string\"\n]\n", string(*mw))
assert.Len(t, GetLines(), 0)
})

t.Run("should print multi line in JSON format", func(t *testing.T) {
Expand All @@ -75,5 +76,6 @@ func TestFlush(t *testing.T) {

Flush()
assert.Equal(t, "[\n \"test string-1\",\n \"test string-2\"\n]\n", string(*mw))
assert.Len(t, GetLines(), 0)
})
}

0 comments on commit 9ad4704

Please sign in to comment.