Skip to content

Commit

Permalink
fix: add more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanSpeakEasy authored and daveshanley committed Aug 7, 2024
1 parent 0cbf094 commit fb545f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions json/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,11 @@ func TestYAMLNodeWithComplexKeysToJSON(t *testing.T) {
}
}`, string(j))
}

func TestYAMLNodeToJSONInvalidNode(t *testing.T) {
var v yaml.Node

j, err := json.YAMLNodeToJSON(&v, " ")
assert.Nil(t, j)
assert.Error(t, err)
}

0 comments on commit fb545f9

Please sign in to comment.