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

Function TestChecksCommand

pkg/cli/checks_command_test.go:211–224  ·  view source on GitHub ↗

--------------------------------------------------------------------------- NewChecksCommand – command shape tests ---------------------------------------------------------------------------

(t *testing.T)

Source from the content-addressed store, hash-verified

209// ---------------------------------------------------------------------------
210
211func TestChecksCommand(t *testing.T) {
212 cmd := NewChecksCommand()
213 require.NotNil(t, cmd, "checks command should not be nil")
214 assert.Equal(t, "checks", cmd.Name(), "command name should be 'checks'")
215 assert.True(t, cmd.HasAvailableFlags(), "command should expose flags")
216
217 repoFlag := cmd.Flags().Lookup("repo")
218 require.NotNil(t, repoFlag, "should have --repo flag")
219 assert.Empty(t, repoFlag.DefValue, "--repo default should be empty")
220
221 jsonFlag := cmd.Flags().Lookup("json")
222 require.NotNil(t, jsonFlag, "should have --json flag")
223 assert.Equal(t, "false", jsonFlag.DefValue, "--json default should be false")
224}
225
226func TestChecksCommand_RequiresArg(t *testing.T) {
227 cmd := NewChecksCommand()

Callers

nothing calls this directly

Calls 1

NewChecksCommandFunction · 0.85

Tested by

no test coverage detected