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

Function TestLoadState_NonexistentFile

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

Source from the content-addressed store, hash-verified

6)
7
8func TestLoadState_NonexistentFile(t *testing.T) {
9 dir := t.TempDir()
10
11 state, err := LoadState(dir, "github")
12 if err != nil {
13 t.Fatalf("unexpected error: %v", err)
14 }
15
16 if state.Source != "github" {
17 t.Errorf("expected source=github, got %q", state.Source)
18 }
19 if len(state.Tasks) != 0 {
20 t.Errorf("expected empty tasks map, got %d entries", len(state.Tasks))
21 }
22}
23
24func TestState_SaveAndLoadRoundtrip(t *testing.T) {
25 dir := t.TempDir()

Callers

nothing calls this directly

Calls 1

LoadStateFunction · 0.85

Tested by

no test coverage detected