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>