Skip to content

test(api-resume-upload): create integration tests for resume upload route#5939

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
ARPANPATRA111:test/api-resume-upload-v1
Jun 18, 2026
Merged

test(api-resume-upload): create integration tests for resume upload route#5939
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
ARPANPATRA111:test/api-resume-upload-v1

Conversation

@ARPANPATRA111

Copy link
Copy Markdown
Contributor

Description

Fixes #2355

Enhances integration test coverage for the POST /api/student/resume/upload route.

Changes

  • Added makeEmptyUploadRequest() helper for testing missing file scenario
  • Added afterEach to restore original FormData

Tests (5 total — 3 existing + 2 new)

  1. ✅ Returns 400 for disallowed mime type (existing)
  2. ✅ Returns 400 when content does not match declared PDF type (existing)
  3. ✅ Accepts valid PDF file (existing)
  4. NEW — Returns 400 when no resume file is provided in the form data
  5. NEW — Returns 400 for a file exceeding the 5MB size limit

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.
  • 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.
  • I have started the repo.
  • I have made sure that i have only one commit to merge in this PR.

@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 3628.47 KB 3628.47 KB 0 B
Total CSS 284.92 KB 284.92 KB 0 B

@ARPANPATRA111 ARPANPATRA111 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 Jun 18, 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.

Difficulty: intermediate – Adds integration tests to upload.test.ts (42 additions) for resume upload API route.

Quality: clean – Proper API testing.

Type: testing – Integration coverage.

Good API tests!

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 18, 2026
@JhaSourav07 JhaSourav07 merged commit 39941e0 into JhaSourav07:main Jun 18, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 18, 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(api-resume-upload): create integration tests for resume upload route

3 participants