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

Function TestCompletionCommand_InvalidShell

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

Source from the content-addressed store, hash-verified

68}
69
70func TestCompletionCommand_InvalidShell(t *testing.T) {
71 rootCmd := &cobra.Command{Use: "gh"}
72 completionCmd := NewCompletionCommand()
73 rootCmd.AddCommand(completionCmd)
74
75 rootCmd.SetArgs([]string{"completion", "invalid"})
76 err := rootCmd.Execute()
77
78 require.Error(t, err)
79 assert.Contains(t, err.Error(), "invalid argument")
80}
81
82func TestCompletionCommand_NoArgs(t *testing.T) {
83 rootCmd := &cobra.Command{Use: "gh"}

Callers

nothing calls this directly

Calls 2

NewCompletionCommandFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected