test: 补齐创建项目标题参数

This commit is contained in:
GouJ committed 2026-09-24 18:25:17 +08:00
1 parent 571f947503
commit 375c4de7cc
1 file changed
+2 -1
+2 -1
View File
@@ -135,11 +135,12 @@ describe('后端 API 契约', () => {
)
vi.stubGlobal('fetch', fetcher)
expect(await projectsApi.list()).toEqual([{ id: 'p1' }])
expect(await projectsApi.create({ topic: '故事', style: '悬疑', episodeCount: 3 })).toEqual({
expect(await projectsApi.create({ title: '测试项目', topic: '故事', style: '悬疑', episodeCount: 3 })).toEqual({
projectId: 'p2',
status: 'generating'
})
expect(JSON.parse(fetcher.mock.calls[1]![1].body as string)).toEqual({
title: '测试项目',
topic: '故事',
style: '悬疑',
episodeCount: 3