MCPcopy Create free account
hub / github.com/cli/cli / testingPortsApp

Function testingPortsApp

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

Source from the content-addressed store, hash-verified

201}
202
203func testingPortsApp() *App {
204 disabledCodespace := &api.Codespace{
205 Name: "disabledCodespace",
206 PendingOperation: true,
207 PendingOperationDisabledReason: "Some pending operation",
208 }
209 apiMock := &apiClientMock{
210 GetCodespaceFunc: func(_ context.Context, name string, _ bool) (*api.Codespace, error) {
211 if name == "disabledCodespace" {
212 return disabledCodespace, nil
213 }
214 return nil, nil
215 },
216 }
217
218 ios, _, _, _ := iostreams.Test()
219
220 return NewApp(ios, nil, apiMock, nil, nil)
221}

Calls 2

TestFunction · 0.92
NewAppFunction · 0.85

Tested by

no test coverage detected