-
Notifications
You must be signed in to change notification settings - Fork 6.4k
test: Add unit test for projects/app/src/web/core/ai/channel.ts #4991
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 projects/app/src/web/core/ai/channel.ts #4991
Conversation
Preview mcp_server Image: |
Preview sandbox Image: |
Coverage Report
File CoverageNo changed files found. |
Preview fastgpt Image: |
… summary instead of models.
ade48ef
to
4beb2fb
Compare
Preview mcp_server Image: |
Preview sandbox Image: |
Preview fastgpt Image: |
… summary instead of models. (labring#4991) Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
… summary instead of models. (labring#4991) Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
Trigger Info
Summary
This PR updates the
channel.api
test suite to enhance the testing of thegetDashboardV2
function. Key changes include:Modification of Test Data Structure:
models
withsummary
in the test data structure to align with the updated API response format.Addition of New Test Case:
Added a new test case to validate the
getDashboardV2
function when fetching dashboard data with aminute
timespan.Mocked API response includes a
summary
array containing details such asmodel
,tokens
,price
, andcount
.These changes ensure the test suite accurately reflects the current API behavior and improves coverage for different timespan scenarios.
Coverage
The change in coverage value, such as:
0% -> 50%
, indicates that the coverage was 0% before writing the tests and 50% after writing them.https://web.dev/articles/ta-code-coverage
Test Statuses
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