laststance / laststance/gitbox
Add dedicated unit tests for sanitizeNextPath
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 2
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 2
Description
Summary
sanitizeNextPath lacks dedicated unit tests (especially the null-input branch).
Source
P2 follow-up from /ship adversarial review of PR #176 (silent GitHub token refresh).
Details
Currently exercised only indirectly via the refresh-route tests. Direct coverage missing.
Acceptance
- Test file
src/tests/unit/lib/utils/sanitize-next.test.tscreated - Coverage: null input, relative paths, absolute paths,
javascript:URLs, protocol-relative URLs, double slashes, fallback default
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the sanitizeNextPath implementation and review the existing refresh-route tests that currently exercise it indirectly. Create src/tests/unit/lib/utils/sanitize-next.test.ts with cases for null input, relative and absolute paths, javascript: URLs, protocol-relative URLs, double slashes, and the fallback default; done means all listed branches have direct unit coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- security, testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100