MCPcopy Create free account
hub / github.com/diillson/chatcli / TestSmartCommitScript

Function TestSmartCommitScript

cli/agent/workers/scripts_test.go:131–143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

129}
130
131func TestSmartCommitScript(t *testing.T) {
132 // smartCommitScript runs git-status and git-diff via engine.
133 // It will work even outside a git repo (commands will error but script won't panic)
134 result, err := smartCommitScript(context.Background(), map[string]string{}, nil)
135 // err might be non-nil if not in a git repo, that's ok
136 _ = err
137 if result == "" {
138 t.Error("expected non-empty result from smartCommitScript")
139 }
140 if !strings.Contains(result, "Status") {
141 t.Error("expected 'Status' section in result")
142 }
143}
144
145func TestReviewChangesScript(t *testing.T) {
146 result, err := reviewChangesScript(context.Background(), map[string]string{}, nil)

Callers

nothing calls this directly

Calls 2

smartCommitScriptFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected