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

Function TestCompletionCommand_NoArgs

pkg/cli/completion_command_test.go:82–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

80}
81
82func TestCompletionCommand_NoArgs(t *testing.T) {
83 rootCmd := &cobra.Command{Use: "gh"}
84 completionCmd := NewCompletionCommand()
85 rootCmd.AddCommand(completionCmd)
86
87 rootCmd.SetArgs([]string{"completion"})
88 err := rootCmd.Execute()
89
90 require.Error(t, err)
91 assert.Contains(t, err.Error(), "accepts 1 arg(s)")
92}
93
94func TestCompletionCommand_InstallSubcommand(t *testing.T) {
95 cmd := NewCompletionCommand()

Callers

nothing calls this directly

Calls 2

NewCompletionCommandFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected