MCPcopy Index your code
hub / github.com/MiniCodeMonkey/chief / TestNewLoopWithWorkDir

Function TestNewLoopWithWorkDir

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

Source from the content-addressed store, hash-verified

100}
101
102func TestNewLoopWithWorkDir(t *testing.T) {
103 l := NewLoopWithWorkDir("/path/to/prd.json", "/work/dir", "test prompt", 5, testProvider)
104
105 if l.prdPath != "/path/to/prd.json" {
106 t.Errorf("Expected prdPath %q, got %q", "/path/to/prd.json", l.prdPath)
107 }
108 if l.workDir != "/work/dir" {
109 t.Errorf("Expected workDir %q, got %q", "/work/dir", l.workDir)
110 }
111 if l.prompt != "test prompt" {
112 t.Errorf("Expected prompt %q, got %q", "test prompt", l.prompt)
113 }
114 if l.maxIter != 5 {
115 t.Errorf("Expected maxIter %d, got %d", 5, l.maxIter)
116 }
117 if l.events == nil {
118 t.Error("Expected events channel to be initialized")
119 }
120}
121
122func TestNewLoopWithWorkDir_EmptyWorkDir(t *testing.T) {
123 l := NewLoopWithWorkDir("/path/to/prd.json", "", "test prompt", 5, testProvider)

Callers

nothing calls this directly

Calls 1

NewLoopWithWorkDirFunction · 0.85

Tested by

no test coverage detected