MCPcopy Create free account
hub / github.com/cheat/cheat / TestSheetFailure

Function TestSheetFailure

internal/sheet/sheet_test.go:60–73  ·  view source on GitHub ↗

TestSheetFailure asserts that an error is returned if the sheet cannot be read

(t *testing.T)

Source from the content-addressed store, hash-verified

58// TestSheetFailure asserts that an error is returned if the sheet cannot be
59// read
60func TestSheetFailure(t *testing.T) {
61
62 // initialize a sheet
63 _, err := New(
64 "foo",
65 "community",
66 mocks.Path("/does-not-exist"),
67 []string{"alpha", "bravo"},
68 false,
69 )
70 if err == nil {
71 t.Errorf("failed to return an error on unreadable sheet")
72 }
73}
74
75// TestSheetFrontMatterFailure asserts that an error is returned if the sheet's
76// frontmatter cannot be parsed.

Callers

nothing calls this directly

Calls 2

PathFunction · 0.92
NewFunction · 0.70

Tested by

no test coverage detected