Skip to content

test(themes): add comprehensive Vitest coverage — hex validity, theme count, structure, and AUTO_THEME integrity#4183

Merged
JhaSourav07 merged 6 commits into
JhaSourav07:mainfrom
ChetanSenta:test/themes-hex-validity-and-integrity
Jun 12, 2026
Merged

test(themes): add comprehensive Vitest coverage — hex validity, theme count, structure, and AUTO_THEME integrity#4183
JhaSourav07 merged 6 commits into
JhaSourav07:mainfrom
ChetanSenta:test/themes-hex-validity-and-integrity

Conversation

@ChetanSenta

Copy link
Copy Markdown
Contributor

Description

Fixes #4181

Pillar

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

Visual Preview

No visual change — pure test additions.

What this PR does

lib/svg/themes.test.ts previously had only 3 tests covering 2 specific
themes. This PR adds 45 new tests covering 4 critical gaps:

Gap Tests Added
Hex validity — all 20 themes × 3 properties 60 values checked via it.each
Theme count matches THEMES.md (20 themes) 2 tests
Every theme has exactly bg/text/accent keys it.each per theme
AUTO_THEME_LIGHT and AUTO_THEME_DARK integrity 11 tests
Known palette regression guards 4 tests

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.
  • 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.
  • (Recommended) I joined the CommitPulse Discord server.

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

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

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

@ChetanSenta ChetanSenta force-pushed the test/themes-hex-validity-and-integrity branch from f309396 to 113c426 Compare June 6, 2026 18:16
@ChetanSenta ChetanSenta force-pushed the test/themes-hex-validity-and-integrity branch from 1e778a5 to 036e269 Compare June 7, 2026 05:14
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jun 7, 2026
@Aamod-Dev Aamod-Dev added mentor:Aamod007 GSSoC 2026 level:intermediate Moderate complexity tasks quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jun 7, 2026
@github-actions github-actions Bot added the type:testing Adding, updating, or fixing tests label Jun 8, 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 putting this together. The code looks clean and solves the issue effectively.

I am adding the quality:exceptional label because the implementation not only solves the core issue but goes beyond by effectively handling edge cases, tests, or reducing technical debt. Great work going above and beyond!

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 contribution. I went through the changes and the overall approach looks good, but there are a few issues that should be addressed before this can be merged. Most of the concerns are related to correctness and maintainability.

  • There are merge conflicts with the base branch. Please resolve them to ensure existing functionality isn't broken.

Once these issues are addressed, I'll be happy to take another look. Thanks again for the contribution.

@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. The overall approach looks good, but the CI pipeline is currently failing. Please run the checks (like npm run format, npm run lint, and npm run test) locally to identify and fix the issues. Let me know once it's green!

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jun 12, 2026
@ChetanSenta ChetanSenta requested a review from Aamod-Dev June 12, 2026 06:13
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jun 12, 2026
@ChetanSenta

Copy link
Copy Markdown
Contributor Author

Thanks for the contribution. The overall approach looks good, but the CI pipeline is currently failing. Please run the checks (like npm run format, npm run lint, and npm run test) locally to identify and fix the issues. Let me know once it's green!

done ✔️

@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 fixing the CI pipeline! Approving.

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 12, 2026
@JhaSourav07 JhaSourav07 merged commit 52d1c99 into JhaSourav07:main Jun 12, 2026
5 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 @ChetanSenta! 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 gssoc:needs-rebase GSSoC 2026 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.

[Testing]: themes.test.ts has only 3 tests — missing hex validity, theme count, and AUTO_THEME pair integrity checks

3 participants