Skip to content

Commit

Permalink
refactor: added test for empty json object
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashk767 committed Jun 14, 2024
1 parent 3ce857e commit 89f9d5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ func TestParseJSONData(t *testing.T) {
selector: "key2",
expected: "value2",
},
{
name: "Empty JSON Object",
input: `{}`,
selector: "key1",
expectedErr: "unknown key key1",
},
{
name: "Empty JSON Array",
input: `[]`,
Expand Down

0 comments on commit 89f9d5d

Please sign in to comment.