chore: add more test coverage

This commit is contained in:
Tristan Cartledge
2023-12-14 16:46:34 +00:00
parent 55eb38c035
commit a08b859904
3 changed files with 65 additions and 1 deletions

View File

@@ -4,8 +4,9 @@
package utils
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCreateBoolNode(t *testing.T) {
@@ -47,3 +48,9 @@ func TestCreateRefNode(t *testing.T) {
assert.Equal(t, "!!str", r.Content[1].Tag)
assert.Equal(t, "#/components/schemas/MySchema", r.Content[1].Value)
}
func TestCreateYamlNode(t *testing.T) {
y := CreateYamlNode("foo")
assert.Equal(t, "!!str", y.Tag)
assert.Equal(t, "foo", y.Value)
}