--------------------------------------------------------------------------- NewChecksCommand – command shape tests ---------------------------------------------------------------------------
(t *testing.T)
| 209 | // --------------------------------------------------------------------------- |
| 210 | |
| 211 | func 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 | |
| 226 | func TestChecksCommand_RequiresArg(t *testing.T) { |
| 227 | cmd := NewChecksCommand() |
nothing calls this directly
no test coverage detected