diff --git a/json/json_test.go b/json/json_test.go index 8942c05..1d8a69b 100644 --- a/json/json_test.go +++ b/json/json_test.go @@ -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) +}