MCPcopy
hub / github.com/cheat/cheat / TestSheetFrontMatterFailure

Function TestSheetFrontMatterFailure

internal/sheet/sheet_test.go:77–90  ·  view source on GitHub ↗

TestSheetFrontMatterFailure asserts that an error is returned if the sheet's frontmatter cannot be parsed.

(t *testing.T)

Source from the content-addressed store, hash-verified

75// TestSheetFrontMatterFailure asserts that an error is returned if the sheet's
76// frontmatter cannot be parsed.
77func TestSheetFrontMatterFailure(t *testing.T) {
78
79 // initialize a sheet
80 _, err := New(
81 "foo",
82 "community",
83 mocks.Path("sheet/bad-fm"),
84 []string{"alpha", "bravo"},
85 false,
86 )
87 if err == nil {
88 t.Errorf("failed to return an error on malformed front-matter")
89 }
90}

Callers

nothing calls this directly

Calls 2

PathFunction · 0.92
NewFunction · 0.70

Tested by

no test coverage detected