grokkit/cmd/agent_test.go
Greg Gauthier 9927b1fb6a chore(build): add Makefile and tests for commands and utilities
- Introduced Makefile with targets for testing (all, coverage, agent-specific), building, installing, cleaning, and help
- Added unit and integration tests for agent command, edit command, and CleanCodeResponse function
- Refactored CleanCodeResponse to use regex for robust markdown fence removal in agent and client modules
- Ensured tests cover code cleaning, plan generation placeholders, and file editing functionality
2026-03-01 00:24:48 +00:00

20 lines
453 B
Go

package cmd
import (
"testing"
)
func TestAgentCommand_PlanGeneration(t *testing.T) {
t.Log("Agent plan generation test placeholder — ready for expansion")
}
func TestAgentCommand_CleanCodeResponseIntegration(t *testing.T) {
input := "```go\npackage main\nfunc main() {}\n```"
expected := "package main\nfunc main() {}"
got := CleanCodeResponse(input)
if got != expected {
t.Errorf("CleanCodeResponse() = %q, want %q", got, expected)
}
}