Skip to content

test: add trustedProxy coverage tests#5329

Merged
JhaSourav07 merged 3 commits into
JhaSourav07:mainfrom
navyabansal21:test/trustedProxy-theme-contrast
Jun 12, 2026
Merged

test: add trustedProxy coverage tests#5329
JhaSourav07 merged 3 commits into
JhaSourav07:mainfrom
navyabansal21:test/trustedProxy-theme-contrast

Conversation

@navyabansal21

Copy link
Copy Markdown
Contributor

Description

Adds a new test suite for utils/trustedProxy.ts in utils/trustedProxy.theme-contrast.test.ts.

The target file contains trusted proxy and IP validation utilities, so the tests focus on the actual implemented behavior, including IPv4 validation, CIDR matching, trusted proxy detection, and private range handling.

Fixes #4542

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A (test-only changes)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally.
  • I have run npm run format and npm run lint locally and resolved all errors.
  • My commits follow the Conventional Commits format.
  • I have updated README.md if I added a new theme or URL parameter. (Not applicable)
  • I have starred the repo.
  • I have made sure that I have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard. (Not applicable)
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@navyabansal21 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jun 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Hey @navyabansal21, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

Please fix the issues before this can be reviewed. Here's how:

1. Run checks locally before pushing:

npm run format:check   # Check Prettier formatting
npm run lint           # Run ESLint
npm run typecheck      # TypeScript type check
npm run test           # Run unit tests (Vitest)
npm run build          # Verify production build passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

@Aamod-Dev Aamod-Dev added level:beginner Small changes Usually isolated fixes or simple UI/text updates. type:testing Adding, updating, or fixing tests mentor:Aamod007 labels Jun 12, 2026

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I've reviewed the tests, and while they correctly validate the trusted proxy logic, the file naming and test suite description seem to be incorrect. They currently refer to 'Theme Contrast Cohesion', which doesn't align with the content of the tests.

Please rename the file from \ rustedProxy.theme-contrast.test.ts\ to something more appropriate like \ rustedProxy.coverage.test.ts, or simply merge these tests into the existing \ rustedProxy.test.ts. Similarly, please update the \describe\ block to reflect what is actually being tested (e.g., 'Trusted Proxy Utilities').

Labels Applied:

  • \level:beginner: This PR adds self-contained unit tests for existing utility functions without complex setup.
  • \ ype:testing: The primary purpose of this PR is to add unit tests.
  • \mentor:Aamod007\

Once these minor naming issues are resolved, this will be ready to merge.

@Aamod-Dev Aamod-Dev added gssoc:approved PR has been reviewed and accepted for valid contribution points quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jun 12, 2026
@Aamod-Dev

Copy link
Copy Markdown
Collaborator

Review Update
Automatically adjusted labels to meet the strict 1:1:1:1:1 category requirement.

@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 12, 2026
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jun 12, 2026

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for renaming the file and updating the test description! Approving.

@JhaSourav07 JhaSourav07 merged commit 3deb87d into JhaSourav07:main Jun 12, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @navyabansal21! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

@JhaSourav07 JhaSourav07 added gssoc:approved PR has been reviewed and accepted for valid contribution points and removed gssoc:approved PR has been reviewed and accepted for valid contribution points labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(trustedProxy-theme-contrast): verify Dark and Light Prefers-Color-Scheme Visual Cohesion (Variation 3)

3 participants