Skip to content

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

Open
kanishka-2007-tech wants to merge 3 commits into
JhaSourav07:mainfrom
kanishka-2007-tech:routetype
Open

test(api/track-user): add TypeScript compiler validation tests for route handlers#8083
kanishka-2007-tech wants to merge 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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)

1 participant