Skip to content

test: add notify route delete coverage#4956

Merged
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
pari-28:test-4433-notify-theme-contrast
Jun 14, 2026
Merged

test: add notify route delete coverage#4956
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
pari-28:test-4433-notify-theme-contrast

Conversation

@pari-28

@pari-28 pari-28 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #4433

Added app/api/notify/route.delete.test.ts to provide isolated test coverage for the notify DELETE endpoint.

Added Test Coverage

  • Missing user parameter validation
  • Rate limiting behavior
  • Development-mode bypass when database configuration is unavailable
  • Notification preference not found handling
  • Successful notification preference deletion

Validation

  • Added 5 test cases
  • Verified locally using Vitest
  • All tests passing successfully

Pillar

  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A (test-only change)

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 required. (Not applicable)
  • 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. (Not applicable)
  • (Recommended) I joined the CommitPulse Discord community.

@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@pari-28 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 type:testing Adding, updating, or fixing tests label Jun 9, 2026
@Aamod-Dev Aamod-Dev added level:beginner Small changes Usually isolated fixes or simple UI/text updates. GSSoC 2026 mentor:Aamod007 labels Jun 11, 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 PR. I am requesting changes because this applies 'theme contrast' coverage to the 'notify' API route. Server-side API routes do not render any interactive DOM elements or CSS properties, making it impossible to test them for light and dark modes. Please target theme contrast tests to frontend UI components exclusively.

@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. Please take a look at the points below and update the PR accordingly.

  • The test targets an API route, which handles backend logic and does not have a user interface. Testing visual theme contrast here is not applicable.
  • It appears the tests rely on asserting local hardcoded variables against themselves rather than exercising the actual application logic.

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

@pari-28 pari-28 changed the title test: add theme contrast coverage for notify route test: add notify route delete coverage Jun 11, 2026
@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jun 11, 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.

No concerns from my end. Approved.

@Aamod-Dev Aamod-Dev added the quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. label Jun 13, 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.

This PR is currently marked with the \status:blocked\ label. Please resolve the blockers so we can proceed with a full review and approval.

@Aamod-Dev Aamod-Dev added level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:feature New features, additions, or enhancements and removed level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jun 13, 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 went through the changes and have evaluated them according to the rubric.

@pari-28 pari-28 force-pushed the test-4433-notify-theme-contrast branch from e425bca to af6cb9d Compare June 13, 2026 11:58
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jun 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

✨ No significant bundle size changes detected.

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3405.30 KB 3405.30 KB 0 B
Total CSS 252.94 KB 252.94 KB 0 B

@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.

Excellent test coverage! I went through the changes and covering the deletion routes for notifications secures user privacy and state consistency.
Labels applied:

  • level:advanced: Simulating complex route deletions.
  • quality:clean: Perfect assertions.
  • ype:feature, ype:testing: Ensures notification lifecycle safety.

@Aamod-Dev Aamod-Dev added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 14, 2026
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 14, 2026
@JhaSourav07 JhaSourav07 merged commit 26bc110 into JhaSourav07:main Jun 14, 2026
6 of 7 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @pari-28! 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 2026 level:advanced Complex contributions involving architecture, optimization, or significant feature work mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:feature New features, additions, or enhancements type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants