Commit 1a9cc71
authored
test(mongodb): verify User schema behaviors under connection state 2 (connecting) (Variation 1) (JhaSourav07#1988)
## Description
Fixes JhaSourav07#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
- [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
Test execution result for the new connection state 2 coverage:
<img width="700" height="541" alt="Screenshot 2026-05-31 at 11 47 19 AM"
src="https://github.com/user-attachments/assets/311690bc-f4ee-4e58-b9b1-1e2d98b8c77e"
/>
## Checklist before requesting a review:
- [x] I have read the `CONTRIBUTING.md` file.
- [x] I have tested these changes locally
(`localhost:3000/api/streak?user=YOUR_USERNAME`).
- [x] I have run `npm run format` and `npm run lint` locally and
resolved all errors (CI will fail otherwise).
- [x] 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.
- [x] I have started the repo.
- [x] I have made sure that i have only one commit to merge in this PR.
- [x] 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.1 file changed
Lines changed: 12 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
78 | 76 | | |
79 | 77 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 78 | + | |
93 | 79 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
107 | 83 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 84 | + | |
| 85 | + | |
118 | 86 | | |
119 | 87 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
124 | 92 | | |
125 | | - | |
126 | 93 | | |
127 | 94 | | |
128 | 95 | | |
| |||
0 commit comments