Skip to content

\test(cacheControl): add empty-fallback test and robust options param…#5306

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
ShafinNigamana:test/cache-control-empty-fallback
Jun 12, 2026
Merged

\test(cacheControl): add empty-fallback test and robust options param…#5306
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
ShafinNigamana:test/cache-control-empty-fallback

Conversation

@ShafinNigamana

Copy link
Copy Markdown
Contributor

Description

Adds a robust empty-fallback test suite for utils/cacheControl.ts and refactors the buildCacheControlHeader function to safely handle missing or null/undefined option parameters without crashing.

Fixes #4304

Pillar

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

Visual Preview

N/A — Purely a logic / unit testing update. No visual 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 (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started 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 (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

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

Copy link
Copy Markdown
Contributor

🚨 Hey @ShafinNigamana, 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. 💪

@ShafinNigamana ShafinNigamana force-pushed the test/cache-control-empty-fallback branch 2 times, most recently from ce43a23 to 6c66f1c Compare June 11, 2026 20:33
@ShafinNigamana ShafinNigamana force-pushed the test/cache-control-empty-fallback branch from 6c66f1c to 3e47e5a Compare June 11, 2026 20:41
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jun 11, 2026
@Aamod-Dev Aamod-Dev added quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. level:beginner Small changes Usually isolated fixes or simple UI/text updates. 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.

Good work on this one. I reviewed the diff and it looks ready to go from my side.

The test coverage added here looks comprehensive and well-structured. It definitely improves the reliability of the system.

Looks solid. I'll go ahead and approve.

@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 PR. I've reviewed the changes and they look good to me.

No concerns from my end. Approved.

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 12, 2026
@JhaSourav07 JhaSourav07 merged commit 874853e into JhaSourav07:main Jun 12, 2026
7 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @ShafinNigamana! 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! 💻✨

@Aamod-Dev Aamod-Dev added mentor:Aamod007 level:intermediate Moderate complexity tasks quality:exceptional Outstanding contribution with exceptional implementation quality, testing. type:feature New features, additions, or enhancements type:testing Adding, updating, or fixing tests and removed level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:exceptional Outstanding contribution with exceptional implementation quality, testing. type:feature New features, additions, or enhancements labels Jun 12, 2026
@Aamod-Dev

Copy link
Copy Markdown
Collaborator

Review Summary
Removed duplicate category labels (quality:exceptional, ype:feature) to adhere to the strict rule of exactly one label per category (retained quality:clean, ype:testing).

@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:intermediate Moderate complexity tasks 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(cacheControl-empty-fallback): verify Edge Cases & Empty/Missing Inputs Verification (Variation 1)

3 participants