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

Function TestInitCommandFlagValidation

pkg/cli/init_command_test.go:791–808  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

789}
790
791func TestInitCommandFlagValidation(t *testing.T) {
792 t.Parallel()
793
794 cmd := NewInitCommand()
795
796 // Test that no-mcp flag is a boolean
797 noMcpFlag := cmd.Flags().Lookup("no-mcp")
798 if noMcpFlag == nil {
799 t.Fatal("Expected 'no-mcp' flag to exist")
800 }
801
802 if noMcpFlag.Value.Type() != "bool" {
803 t.Errorf("Expected no-mcp flag to be bool, got %s", noMcpFlag.Value.Type())
804 }
805
806 // Test verbose flag exists (inherited from parent command likely)
807 // Note: verbose flag might be added by parent command, not in init command itself
808}
809
810func TestInitRepositoryErrorHandling(t *testing.T) {
811 tmpDir := testutil.TempDir(t, "test-*")

Callers

nothing calls this directly

Calls 2

NewInitCommandFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected