Skip to content

test(api/track-user): add TypeScript compiler validation tests for route handlers#8083

Merged
JhaSourav07 merged 3 commits into
JhaSourav07:mainfrom
kanishka-2007-tech:routetype
Jul 17, 2026
Merged

test(api/track-user): add TypeScript compiler validation tests for route handlers#8083
JhaSourav07 merged 3 commits into
JhaSourav07:mainfrom
kanishka-2007-tech:routetype

Conversation

@kanishka-2007-tech

@kanishka-2007-tech kanishka-2007-tech commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces a dedicated TypeScript compiler validation test suite for the /api/track-user route to ensure the exported route handlers maintain stable type signatures and schema constraints over time.

Changes Made
Added app/api/track-user/route.type-compiler.test.ts.
Verified that both POST and OPTIONS handlers are exported correctly.
Added compile-time assertions to validate the route handlers' function signatures.
Ensured both handlers accept a standard Request object.
Verified the handlers return asynchronous Response/NextResponse objects.
Added isolated type-level tests using expectTypeOf.

Fixes #6812

Pillar

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

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • 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.

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@kanishka-2007-tech 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 Jul 15, 2026
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jul 16, 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 3958.92 KB 3958.92 KB 0 B
Total CSS 327.67 KB 327.67 KB 0 B

@Aamod007 Aamod007 added level:intermediate Moderate complexity tasks quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests mentor:Aamod007 labels Jul 17, 2026

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

Nice job adding the TypeScript compiler validation tests for the track-user route handlers. Type safety is important. However, the Vercel deployment check has failed. Please resolve the issues and rerun the CI pipeline.

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

Upon re-evaluation, I realized I previously misinterpreted the Vercel deployment failure as an issue with this PR. The Vercel build failure seems unrelated to the changes introduced here, so I will ignore it moving forward. The rest of the PR looks good, so I'm approving it!

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jul 17, 2026
@JhaSourav07
JhaSourav07 merged commit f9b956a into JhaSourav07:main Jul 17, 2026
9 of 10 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @kanishka-2007-tech! 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! 💻✨

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(ApiTrack-userRoute-type-compiler): verify TypeScript Compiler Validation & Schema Constraints Stability (Variation 10)

3 participants