cli/pkg/cmd/discussion
Babak K. Shandiz 19369d0444
test(discussion/client): improve GetWithComments test coverage
Inline all JSON response helpers (getWithCommentsResp, wrapCommentsBlock,
commentNode) to avoid cross-test coupling. Add missing test cases for
empty comments, first page newest reversal, multiple replies on a single
comment, and repo not found. Populate the "maps comments with replies"
case with non-zero field values and use a single assert.Equal for the
full Discussion struct. Match real API error responses for discussions
disabled and repo not found cases. Rename wantDisc to assertDisc across
all client test functions and require it for non-error cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-28 10:38:19 +01:00
..
client test(discussion/client): improve GetWithComments test coverage 2026-04-28 10:38:19 +01:00
list fix(discussion list): include search keywords in web mode 2026-04-14 15:07:32 +01:00
shared feat(discussion view): add cursor-based pagination to comments 2026-04-24 23:50:04 +01:00
view test(discussion view): add tests for view command client methods and --replies mode 2026-04-27 15:42:36 -05:00
discussion.go Add discussion view command 2026-04-24 21:24:25 +01:00