MCPcopy Create free account
hub / github.com/driangle/taskmd / TestLoadGlobalRegistry_EmptyFile

Function TestLoadGlobalRegistry_EmptyFile

apps/cli/internal/cli/registry_test.go:22–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20}
21
22func TestLoadGlobalRegistry_EmptyFile(t *testing.T) {
23 dir := t.TempDir()
24 cfgPath := filepath.Join(dir, "config.yaml")
25 os.WriteFile(cfgPath, []byte("dir: ./tasks\n"), 0644)
26 t.Setenv("TASKMD_HOME_CONFIG", cfgPath)
27
28 entries, err := LoadGlobalRegistry()
29 if err != nil {
30 t.Fatalf("unexpected error: %v", err)
31 }
32 if len(entries) != 0 {
33 t.Fatalf("expected empty entries, got %d", len(entries))
34 }
35}
36
37func TestLoadGlobalRegistry_ValidEntries(t *testing.T) {
38 dir := t.TempDir()

Callers

nothing calls this directly

Calls 1

LoadGlobalRegistryFunction · 0.85

Tested by

no test coverage detected