MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestNewLoop

Function TestNewLoop

internal/loop/loop_test.go:85–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

83}
84
85func TestNewLoop(t *testing.T) {
86 l := NewLoop("/path/to/prd.json", "test prompt", 5, testProvider)
87
88 if l.prdPath != "/path/to/prd.json" {
89 t.Errorf("Expected prdPath %q, got %q", "/path/to/prd.json", l.prdPath)
90 }
91 if l.prompt != "test prompt" {
92 t.Errorf("Expected prompt %q, got %q", "test prompt", l.prompt)
93 }
94 if l.maxIter != 5 {
95 t.Errorf("Expected maxIter %d, got %d", 5, l.maxIter)
96 }
97 if l.events == nil {
98 t.Error("Expected events channel to be initialized")
99 }
100}
101
102func TestNewLoopWithWorkDir(t *testing.T) {
103 l := NewLoopWithWorkDir("/path/to/prd.json", "/work/dir", "test prompt", 5, testProvider)

Callers

nothing calls this directly

Calls 1

NewLoopFunction · 0.85

Tested by

no test coverage detected