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

Function TestGenMdJSONFields

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

Source from the content-addressed store, hash-verified

85}
86
87func TestGenMdJSONFields(t *testing.T) {
88 buf := new(bytes.Buffer)
89 if err := genMarkdownCustom(jsonCmd, buf, nil); err != nil {
90 t.Fatal(err)
91 }
92 output := buf.String()
93
94 checkStringContains(t, output, jsonCmd.Long)
95 checkStringContains(t, output, jsonCmd.Example)
96 checkStringContains(t, output, "JSON Fields")
97 checkStringContains(t, output, "`foo`")
98 checkStringContains(t, output, "`bar`")
99 checkStringContains(t, output, "`baz`")
100}
101
102func TestGenMdTree(t *testing.T) {
103 c := &cobra.Command{Use: "do [OPTIONS] arg1 arg2"}

Callers

nothing calls this directly

Calls 3

genMarkdownCustomFunction · 0.85
checkStringContainsFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected