Skip to content

usePaginationParams and usePaginationUrl have no tests: pagination state and URL building are uncovered #893

Description

@nanaf6203-bit

usePaginationParams and usePaginationUrl have no tests: pagination state and URL building are uncovered

Labels / Complexity: testing · Trivial — Trivial

Summary

usePaginationParams and usePaginationUrl (src/hooks/usePaginationParams.ts, src/hooks/usePaginationUrl.ts) derive pagination state and build paginated URLs. Neither has tests. A regression that mis-parses page/pageSize or builds wrong URLs ships silently across every paginated list.

Proposal

  • Add specs covering param parsing (valid, missing, invalid values), clamping, and URL construction.

Acceptance criteria

  • The specs assert parsing/clamping and URL shapes; they pass via npm test.

Getting started

  • src/hooks/usePaginationParams.ts, src/hooks/usePaginationUrl.ts
  • src/hooks/__tests__/useToast.test.ts — the pattern

Commands: npm test.

Good first files to read: src/hooks/usePaginationParams.ts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programTrivialtestingTest coverage or test reliability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions