(t *testing.T)
| 58 | } |
| 59 | |
| 60 | func TestRenderTextReturnsRenderError(t *testing.T) { |
| 61 | wantErr := errors.New("render failed") |
| 62 | out := New(nil, nil, FormatText) |
| 63 | |
| 64 | err := out.RenderText(func(w io.Writer) error { |
| 65 | return wantErr |
| 66 | }) |
| 67 | |
| 68 | if !errors.Is(err, wantErr) { |
| 69 | t.Fatalf("RenderText error = %v, want %v", err, wantErr) |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | func TestRenderTextRequiresTextFormat(t *testing.T) { |
| 74 | out := New(nil, nil, FormatJSON) |
nothing calls this directly
no test coverage detected