laststance / laststance/gitbox
Add dedicated unit tests for getForwardedClientIp
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 2
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 2
Description
Summary
getForwardedClientIp lacks dedicated unit tests.
Source
P2 follow-up from /ship adversarial review of PR #176 (silent GitHub token refresh).
Details
Need coverage for multi-hop chain, whitespace, empty header, and malformed input.
Acceptance
- Test file
src/tests/unit/lib/utils/get-client-ip.test.tscreated - Coverage: multi-hop chain, whitespace handling, empty header, malformed input, missing header
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
Start by locating getForwardedClientIp and review its existing behavior and nearby tests. Create src/tests/unit/lib/utils/get-client-ip.test.ts with cases for multi-hop chains, whitespace, empty and missing headers, and malformed input. Run the focused unit test file and confirm all listed cases pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100