MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestWriteCard

Function TestWriteCard

internal/app/card_test.go:101–111  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestWriteCard(t *testing.T) {
102 dir := t.TempDir()
103 p := filepath.Join(dir, "card.html")
104 if err := writeCard(p, stats.Stats{LookupsTotal: 1, LookupsByKind: map[stats.LookupKind]int{}}); err != nil {
105 t.Fatal(err)
106 }
107 data, err := os.ReadFile(p)
108 if err != nil || !strings.Contains(string(data), "<!doctype html") {
109 t.Fatalf("card file not written as html: %v", err)
110 }
111}

Callers

nothing calls this directly

Calls 1

writeCardFunction · 0.85

Tested by

no test coverage detected