refactor: yet another one, someday I might be happy

This commit is contained in:
2024-03-24 03:28:08 +00:00
parent ccc3668fa2
commit de3a9e55a8
18 changed files with 613 additions and 499 deletions

View File

@@ -1,11 +1,10 @@
package render_test
package render
import (
"bytes"
"errors"
"testing"
"github.com/jimeh/go-render"
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
)
@@ -67,7 +66,7 @@ func TestYAML_Render(t *testing.T) {
name: "error from yaml.Marshaler",
value: &mockYAMLMarshaler{err: errors.New("mock error")},
wantErr: "render: failed: mock error",
wantErrIs: []error{render.Err, render.ErrFailed},
wantErrIs: []error{Err, ErrFailed},
},
{
name: "invalid value",
@@ -78,7 +77,7 @@ func TestYAML_Render(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
j := &render.YAML{
j := &YAML{
Indent: tt.indent,
}