(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestHeadersAreNotMutated(t *testing.T) { |
| 12 | // Given a TTY environment so that headers are included in the table |
| 13 | ios, _, _, _ := iostreams.Test() |
| 14 | ios.SetStdoutTTY(true) |
| 15 | |
| 16 | // When creating a new table printer |
| 17 | headers := []string{"one", "two", "three"} |
| 18 | _ = tableprinter.New(ios, tableprinter.WithHeader(headers...)) |
| 19 | |
| 20 | // The provided headers should not be mutated |
| 21 | require.Equal(t, []string{"one", "two", "three"}, headers) |
| 22 | } |
nothing calls this directly
no test coverage detected