(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func TestListPorts(t *testing.T) { |
| 17 | ctx := t.Context() |
| 18 | |
| 19 | mockApi := GetMockApi(false) |
| 20 | ios, _, _, _ := iostreams.Test() |
| 21 | |
| 22 | a := &App{ |
| 23 | io: ios, |
| 24 | apiClient: mockApi, |
| 25 | } |
| 26 | |
| 27 | selector := &CodespaceSelector{api: a.apiClient, codespaceName: "codespace-name"} |
| 28 | err := a.ListPorts(ctx, selector, nil) |
| 29 | if err != nil { |
| 30 | t.Errorf("unexpected error: %v", err) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func TestListPorts_escapesControlSequencesInLabel(t *testing.T) { |
| 35 | tests := []struct { |
nothing calls this directly
no test coverage detected