MCPcopy
hub / github.com/cli/cli / TestIssueList_nontty

Function TestIssueList_nontty

pkg/cmd/issue/list/list_test.go:121–140  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

119}
120
121func TestIssueList_nontty(t *testing.T) {
122 http := &httpmock.Registry{}
123 defer http.Verify(t)
124
125 http.Register(
126 httpmock.GraphQL(`query IssueList\b`),
127 httpmock.FileResponse("./fixtures/issueList.json"))
128
129 output, err := runCommand(http, false, "")
130 if err != nil {
131 t.Errorf("error running command `issue list`: %v", err)
132 }
133
134 assert.Equal(t, "", output.Stderr())
135 //nolint:staticcheck // prefer exact matchers over ExpectLines
136 test.ExpectLines(t, output.String(),
137 `1[\t]+number won[\t]+label[\t]+\d+`,
138 `2[\t]+number too[\t]+label[\t]+\d+`,
139 `4[\t]+number fore[\t]+label[\t]+\d+`)
140}
141
142func TestIssueList_tty(t *testing.T) {
143 http := &httpmock.Registry{}

Callers

nothing calls this directly

Calls 10

VerifyMethod · 0.95
RegisterMethod · 0.95
GraphQLFunction · 0.92
FileResponseFunction · 0.92
ExpectLinesFunction · 0.92
EqualMethod · 0.80
StderrMethod · 0.80
runCommandFunction · 0.70
ErrorfMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected