Skip to content

test(mongodb): verify User schema behaviors under connection state 2 (connecting) (Variation 1)#1988

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
bhoomisingh00079:main
May 31, 2026
Merged

test(mongodb): verify User schema behaviors under connection state 2 (connecting) (Variation 1)#1988
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
bhoomisingh00079:main

Conversation

@bhoomisingh00079
Copy link
Copy Markdown
Contributor

@bhoomisingh00079 bhoomisingh00079 commented May 31, 2026

Description

Fixes #1409

Added test coverage for MongoDB connection state 2 (connecting) in models/User.test.ts to ensure the User model remains usable while Mongoose is still establishing a connection.

Pillar

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

Visual Preview

Test execution result for the new connection state 2 coverage:
Screenshot 2026-05-31 at 11 47 19 AM

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.

@bhoomisingh00079
Copy link
Copy Markdown
Contributor Author

@JhaSourav07 @souravjhahind please review this and authorize.

Copy link
Copy Markdown
Collaborator

@Aamod007 Aamod007 left a comment

Choose a reason for hiding this comment

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

Replaces synthetic connection state tests (state 99, state 0 — both tested locally-defined functions, not production code) with a real state 2 test verifying User model accessibility during connecting state. 8/8 tests pass.

@JhaSourav07 JhaSourav07 added GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:exceptional Outstanding contribution with exceptional implementation quality, testing. gssoc:approved PR has been reviewed and accepted for valid contribution points mentor:Aamod007 labels May 31, 2026
@JhaSourav07 JhaSourav07 merged commit 1a9cc71 into JhaSourav07:main May 31, 2026
18 of 19 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone May 31, 2026
@github-actions
Copy link
Copy Markdown

🎉 Congratulations @bhoomisingh00079! 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 GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:exceptional Outstanding contribution with exceptional implementation quality, testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(mongodb): verify User schema behaviors under connection state 2 (connecting) (Variation 1)

3 participants