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.
usePaginationParams and usePaginationUrl have no tests: pagination state and URL building are uncovered
Labels / Complexity: testing · Trivial — Trivial
Summary
usePaginationParamsandusePaginationUrl(src/hooks/usePaginationParams.ts,src/hooks/usePaginationUrl.ts) derive pagination state and build paginated URLs. Neither has tests. A regression that mis-parsespage/pageSizeor builds wrong URLs ships silently across every paginated list.Proposal
Acceptance criteria
npm test.Getting started
src/hooks/usePaginationParams.ts,src/hooks/usePaginationUrl.tssrc/hooks/__tests__/useToast.test.ts— the patternCommands:
npm test.Good first files to read:
src/hooks/usePaginationParams.ts.