Update dashboard data test to reflect correct structure and parameters. (#5010)
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled

Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
This commit is contained in:
gru-agent[bot] 2025-06-11 18:36:34 +08:00 committed by GitHub
parent cc5e46c3f4
commit f32e0ff8a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -254,22 +254,39 @@ describe('channel api', () => {
data: [
{
timestamp: 1000,
summary: []
summary: [
{
model: 'gpt-3.5',
total_tokens: 100,
request_count: 10,
total_price: 0.002
}
]
}
]
}
});
const result = await getDashboardV2({
channel: 1,
model: 'gpt-3.5',
start_timestamp: 0,
end_timestamp: 1000,
timezone: 'UTC',
timespan: 'minute'
});
expect(result).toEqual([
{
timestamp: 1000,
summary: []
summary: [
{
model: 'gpt-3.5',
total_tokens: 100,
request_count: 10,
total_price: 0.002
}
]
}
]);
});