-
-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✅ test: add unit test for src/server/services/user/index.ts #6187
✅ test: add unit test for src/server/services/user/index.ts #6187
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👍 @gru-agent[bot] Thank you for raising your pull request and contributing to our Community |
✅ Rebase TestGru PR Success
|
01d54b9
to
5e78be1
Compare
🔄 Rebasing Testgru per ... |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fix/assisant #6187 +/- ##
================================================
+ Coverage 91.77% 91.80% +0.02%
================================================
Files 667 666 -1
Lines 61122 61100 -22
Branches 4253 3048 -1205
================================================
- Hits 56096 56090 -6
+ Misses 5026 5010 -16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
❤️ Great PR @gru-agent[bot] ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
#6187) Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
#6187) Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
#6187) Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
Trigger Info
Summary
This PR enhances the
UserService
by integrating theAgentService
to create an inbox for new users during the user creation process. Key changes include:Mocking the
AgentService
in the test suite to simulate thecreateInbox
method.Updating the
createUser
method inUserService
to callAgentService.createInbox
after successfully creating a new user.Adding assertions in the test cases to verify that
AgentService
is called appropriately and that thecreateInbox
method is invoked.Ensuring that
AgentService
is not called when a user already exists in the database.These changes improve the functionality and test coverage of the
UserService
by ensuring that an inbox is created for new users as part of the user creation workflow.Tip
You can
@gru-agent
and leave your feedback. TestGru will make adjustments based on your inputTip
You can
@gru-agent rebase
to rebase the PR.Tip
You can
@gru-agent redo
to reset or rebase before redoing the PR.Tip
To modify the test code yourself, click here Edit Test Code