MCPcopy Index your code
hub / github.com/cli/cli / TestGenMdAliases

Function TestGenMdAliases

internal/docs/markdown_test.go:73–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

71}
72
73func TestGenMdAliases(t *testing.T) {
74 buf := new(bytes.Buffer)
75 if err := genMarkdownCustom(aliasCmd, buf, nil); err != nil {
76 t.Fatal(err)
77 }
78 output := buf.String()
79
80 checkStringContains(t, output, aliasCmd.Long)
81 checkStringContains(t, output, jsonCmd.Example)
82 checkStringContains(t, output, "ALIASES")
83 checkStringContains(t, output, "yoo")
84 checkStringContains(t, output, "foo")
85}
86
87func TestGenMdJSONFields(t *testing.T) {
88 buf := new(bytes.Buffer)

Callers

nothing calls this directly

Calls 3

genMarkdownCustomFunction · 0.85
checkStringContainsFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected