MCPcopy Create free account
hub / github.com/github/gh-aw / TestNewViewCommand_FlagsExist

Function TestNewViewCommand_FlagsExist

pkg/cli/view_command_test.go:17–28  ·  view source on GitHub ↗

─── NewViewCommand ───────────────────────────────────────────────────────────

(t *testing.T)

Source from the content-addressed store, hash-verified

15// ─── NewViewCommand ───────────────────────────────────────────────────────────
16
17func TestNewViewCommand_FlagsExist(t *testing.T) {
18 cmd := NewViewCommand()
19 if cmd == nil {
20 t.Fatal("NewViewCommand returned nil")
21 }
22
23 for _, name := range []string{"output", "repo"} {
24 if cmd.Flags().Lookup(name) == nil && cmd.InheritedFlags().Lookup(name) == nil {
25 t.Errorf("expected flag --%s to be defined", name)
26 }
27 }
28}
29
30func TestNewViewCommand_UseAndShort(t *testing.T) {
31 cmd := NewViewCommand()

Callers

nothing calls this directly

Calls 2

NewViewCommandFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected