test: guard prototype mock data boundaries

This commit is contained in:
hailin
2026-07-10 15:47:20 +08:00
parent bbf32f94b4
commit 265d73c255

View File

@@ -20,7 +20,11 @@ describe('Stage A 演示数据', () => {
}) })
it('保持可信边界和引用完整性', () => { it('保持可信边界和引用完整性', () => {
expect(mcpTools.filter((tool) => tool.access_mode === 'write').every((tool) => tool.requires_human_confirm)).toBe(true) const writeTools = mcpTools.filter((tool) => tool.access_mode === 'write')
expect(writeTools.length).toBeGreaterThan(0)
expect(writeTools.every((tool) => tool.requires_human_confirm)).toBe(true)
expect(knowledgeReferences.length).toBeGreaterThan(0)
expect(knowledgeReferences.every((reference) => reference.score >= 0 && reference.score <= 1)).toBe(true) expect(knowledgeReferences.every((reference) => reference.score >= 0 && reference.score <= 1)).toBe(true)
}) })
}) })