laststance / laststance/gitbox

Add dedicated unit tests for getForwardedClientIp

Open Beginner friendly
#186 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2-medium testing
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.ts created
  • Coverage: multi-hop chain, whitespace handling, empty header, malformed input, missing header

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.