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

Function TestWatcherStop

internal/prd/watcher_test.go:177–194  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

175}
176
177func TestWatcherStop(t *testing.T) {
178 tmpDir := t.TempDir()
179 prdPath := createTestPRDMd(t, tmpDir, []UserStory{
180 {ID: "US-001", Title: "Test Story", Passes: false},
181 })
182
183 watcher, err := NewWatcher(prdPath)
184 if err != nil {
185 t.Fatalf("Failed to create watcher: %v", err)
186 }
187
188 if err := watcher.Start(); err != nil {
189 t.Fatalf("Failed to start watcher: %v", err)
190 }
191
192 watcher.Stop()
193 watcher.Stop() // Should be safe
194}
195
196func TestHasStatusChanged(t *testing.T) {
197 tests := []struct {

Callers

nothing calls this directly

Calls 4

StartMethod · 0.95
StopMethod · 0.95
createTestPRDMdFunction · 0.85
NewWatcherFunction · 0.85

Tested by

no test coverage detected