|
1 | | -import { describe, expect, it } from "vitest"; |
2 | | -import * as Charts from "../../src/charts"; |
3 | | - |
4 | | -const mindMapSchema = { |
| 1 | +export const MindMapSchema = { |
5 | 2 | type: "mind-map", |
6 | 3 | data: { |
7 | 4 | name: "剪映视频剪辑指南", |
@@ -172,7 +169,7 @@ const mindMapSchema = { |
172 | 169 | source: "mcp-server-chart", |
173 | 170 | }; |
174 | 171 |
|
175 | | -const flowDiagramSchema = { |
| 172 | +export const FlowDiagramSchema = { |
176 | 173 | type: "network-graph", |
177 | 174 | data: { |
178 | 175 | nodes: [ |
@@ -266,25 +263,3 @@ const flowDiagramSchema = { |
266 | 263 | height: 600, |
267 | 264 | source: "mcp-server-chart", |
268 | 265 | }; |
269 | | - |
270 | | -describe("valid", () => { |
271 | | - // Valid mind map bad case |
272 | | - it("should valid schema for mind-map chart", () => { |
273 | | - const chartType = "mind-map"; |
274 | | - expect(() => { |
275 | | - const schema = Charts[chartType].schema; |
276 | | - schema.safeParse(mindMapSchema); |
277 | | - }).toThrow("Invalid parameters: node name '文字动画' is not unique."); |
278 | | - }); |
279 | | - |
280 | | - // Valid flow diagram bad case |
281 | | - it("should valid schema for flow diagram chart", () => { |
282 | | - const chartType = "flow-diagram"; |
283 | | - expect(() => { |
284 | | - const schema = Charts[chartType].schema; |
285 | | - schema.safeParse(flowDiagramSchema); |
286 | | - }).toThrow( |
287 | | - "Invalid parameters: edge pair 'KnowledgeBase-Model' is not unique.", |
288 | | - ); |
289 | | - }); |
290 | | -}); |
0 commit comments