MCPcopy
hub / github.com/cli/cli / testingPortsApp

Function testingPortsApp

pkg/cmd/codespace/ports_test.go:168–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166}
167
168func testingPortsApp() *App {
169 disabledCodespace := &api.Codespace{
170 Name: "disabledCodespace",
171 PendingOperation: true,
172 PendingOperationDisabledReason: "Some pending operation",
173 }
174 apiMock := &apiClientMock{
175 GetCodespaceFunc: func(_ context.Context, name string, _ bool) (*api.Codespace, error) {
176 if name == "disabledCodespace" {
177 return disabledCodespace, nil
178 }
179 return nil, nil
180 },
181 }
182
183 ios, _, _, _ := iostreams.Test()
184
185 return NewApp(ios, nil, apiMock, nil, nil)
186}

Calls 2

TestFunction · 0.92
NewAppFunction · 0.85

Tested by

no test coverage detected