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

Function TestNewWatcher

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

Source from the content-addressed store, hash-verified

33}
34
35func TestNewWatcher(t *testing.T) {
36 tmpDir := t.TempDir()
37 prdPath := createTestPRDMd(t, tmpDir, []UserStory{
38 {ID: "US-001", Title: "Test Story", Passes: false},
39 })
40
41 watcher, err := NewWatcher(prdPath)
42 if err != nil {
43 t.Fatalf("Failed to create watcher: %v", err)
44 }
45 defer watcher.Stop()
46
47 if watcher.path != prdPath {
48 t.Errorf("Expected path %s, got %s", prdPath, watcher.path)
49 }
50}
51
52func TestWatcherStart(t *testing.T) {
53 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 3

StopMethod · 0.95
createTestPRDMdFunction · 0.85
NewWatcherFunction · 0.85

Tested by

no test coverage detected