cli/pkg/cmd/discussion/view
Max Beizer 11130fd6be
test(discussion view): add tests for view command client methods and --replies mode
Add table-driven tests for:

Client (client_impl_test.go):
- TestGetByNumber: field mapping, discussions disabled
- TestGetWithComments: field mapping, forward/backward pagination,
  reply reversal in newest mode, discussions disabled
- TestGetCommentReplies: field mapping, forward/backward pagination,
  reply reversal, discussions disabled, nil node, wrong node type

Command (view_test.go):
- TestNewCmdView_repliesFlags: mutual exclusivity with --comments/--web,
  --order/--limit/--after require --comments or --replies, pagination
  flags work with --replies
- TestViewRun_replies: TTY/non-TTY/JSON output, pagination hints,
  routing assertion (GetCommentReplies called, not GetByNumber or
  GetWithComments)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-27 15:42:36 -05:00
..
view.go fix(discussion view): guard against empty comment slice in replies mode 2026-04-27 18:46:14 +01:00
view_test.go test(discussion view): add tests for view command client methods and --replies mode 2026-04-27 15:42:36 -05:00