Skip to content

Commit

Permalink
test: condition/format_json
Browse files Browse the repository at this point in the history
  • Loading branch information
jshlbrd committed Dec 3, 2023
1 parent 2667ec4 commit a57be27
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions condition/format_json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,24 @@ var jsonValidTests = []struct {
[]byte(`{"hello":"world"}`),
true,
},
{
"pass",
config.Config{},
[]byte(`["a","b","c"]`),
true,
},
{
"fail",
config.Config{},
[]byte(`{hello:"world"}`),
false,
},
{
"fail",
config.Config{},
[]byte(`a`),
false,
},
}

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

0 comments on commit a57be27

Please sign in to comment.