(t *testing.T)
| 71 | } |
| 72 | |
| 73 | func TestRenderTextRequiresTextFormat(t *testing.T) { |
| 74 | out := New(nil, nil, FormatJSON) |
| 75 | |
| 76 | err := out.RenderText(func(w io.Writer) error { |
| 77 | return nil |
| 78 | }) |
| 79 | if err == nil { |
| 80 | t.Fatal("expected error for text-only renderer in JSON format") |
| 81 | } |
| 82 | if !errors.Is(err, ErrStructuredOutputUnsupported) { |
| 83 | t.Fatalf("error = %q, want ErrStructuredOutputUnsupported", err.Error()) |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | func TestRenderJSON(t *testing.T) { |
| 88 | var stdout bytes.Buffer |
nothing calls this directly
no test coverage detected