docs: 交付文档、维护指引与端到端回归
补齐 README、开发计划、维护交接与 E2E 用例,执行最终验收。
This commit is contained in:
1 parent
18732801b5
commit
6cd904d460
216 files changed
+37038
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { describe, it, expect, vi } from 'vitest'
|
||||
|
||||
vi.mock('@/services/api', () => ({ default: { post: vi.fn() } }))
|
||||
|
||||
import api from '@/services/api'
|
||||
import { knowledgeService } from '@/services/knowledge'
|
||||
|
||||
describe('knowledgeService errors', () => {
|
||||
it('a URL the server refuses reads as a sentence, not [object Object]', async () => {
|
||||
vi.mocked(api.post).mockRejectedValue({
|
||||
response: { status: 422, data: { detail: [{ loc: ['body', 'websites'], msg: 'Value error, URL must contain a valid domain with TLD' }] } },
|
||||
})
|
||||
await expect(knowledgeService.addUrls('org-1', ['https://localhost'])).rejects.toThrow('URL must contain a valid domain with TLD')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user