MCPcopy Create free account
hub / github.com/codemix/graph / createTestGraph

Function createTestGraph

packages/graph/src/test/multihop-integration.test.ts:23–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23function createTestGraph(): Graph<GraphSchema> {
24 // Create a flexible schema that supports all our test cases
25 const schema = {
26 vertices: {
27 Concept: {
28 properties: {
29 name: { type: makeType<string>("") },
30 },
31 },
32 Property: {
33 properties: {
34 name: { type: makeType<string>("") },
35 },
36 },
37 Node: {
38 properties: {
39 name: { type: makeType<string>("") },
40 },
41 },
42 Person: {
43 properties: {
44 name: { type: makeType<string>("") },
45 },
46 },
47 Company: {
48 properties: {
49 name: { type: makeType<string>("") },
50 },
51 },
52 },
53 edges: {
54 IsA: { properties: {} },
55 RelatesTo: { properties: {} },
56 connects: { properties: {} },
57 WorksAt: { properties: {} },
58 PartneredWith: { properties: {} },
59 },
60 } as const satisfies GraphSchema;
61
62 return new Graph({ schema, storage: new InMemoryGraphStorage() });
63}
64
65test("Multi-hop query integration tests - should execute 2-hop query with single dash syntax", () => {
66 const graph = createTestGraph();

Callers 1

Calls 1

makeTypeFunction · 0.70

Tested by

no test coverage detected