-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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/store/aiInfra/slices/aiModel/selectors.ts #6108
base: main
Are you sure you want to change the base?
✅ test: add unit test for src/store/aiInfra/slices/aiModel/selectors.ts #6108
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
👍 @gru-agent[bot] Thank you for raising your pull request and contributing to our Community |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6108 +/- ##
==========================================
+ Coverage 92.47% 92.53% +0.06%
==========================================
Files 661 661
Lines 60008 60008
Branches 2823 4435 +1612
==========================================
+ Hits 55490 55526 +36
+ Misses 4518 4482 -36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
✅ Rebase TestGru PR Success
|
🔄 Rebasing Testgru per ... |
bf60064
to
988ad12
Compare
Trigger Info
Summary
This PR introduces comprehensive unit tests for the
aiModelSelectors
module, ensuring robust validation of its functionality. Key highlights include:Selector Tests:
aiProviderChatModelListIds
: Verifies filtering of chat model IDs.enabledAiProviderModelList
anddisabledAiProviderModelList
: Confirms correct segregation of enabled and disabled models.filteredAiProviderModelList
: Validates filtering logic based on search keywords.totalAiProviderModelList
andisEmptyAiProviderModelList
: Tests for total count and empty state of the model list.hasRemoteModels
: Checks for the presence of remote models.Model-Specific Tests:
isModelEnabled
andisModelLoading
: Validates enabled and loading states of models.getAiModelById
: Ensures correct retrieval of models by ID.isModelSupportToolUse
,isModelSupportVision
, andisModelSupportReasoning
: Confirms support for specific abilities.isModelHasContextWindowToken
andmodelContextWindowTokens
: Tests for context window token availability and retrieval.Mock State: A mock state is used to simulate various scenarios, ensuring the selectors handle diverse cases effectively.
These tests enhance confidence in the correctness and reliability of the
aiModelSelectors
module.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