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

Function setupSetClauseGraph

packages/graph/src/test/orderByAndForeach.test.ts:125–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124
125function setupSetClauseGraph(): Graph<TestSchema> {
126 const graph = new Graph({
127 schema,
128 storage: new InMemoryGraphStorage(),
129 validateProperties: false,
130 });
131
132 // Create test data
133 graph.addVertex("Person", {
134 name: "Alice",
135 age: 30,
136 salary: 50000,
137 department: "Engineering",
138 });
139 graph.addVertex("Person", {
140 name: "Bob",
141 age: 35,
142 salary: 60000,
143 department: "Sales",
144 });
145 graph.addVertex("Person", {
146 name: "Charlie",
147 age: 25,
148 salary: 45000,
149 department: "Engineering",
150 });
151 graph.addVertex("Person", {
152 name: "Diana",
153 age: null,
154 salary: null,
155 department: null,
156 });
157 graph.addVertex("Person", {
158 name: "Eve",
159 age: 35,
160 salary: 70000,
161 department: "Engineering",
162 });
163
164 return graph;
165}
166
167test("ORDER BY Enhancements - ASCENDING / DESCENDING full keywords - should parse ASCENDING keyword", () => {
168 const ast = parse("MATCH (p:Person) RETURN p ORDER BY p.age ASCENDING") as Query;

Callers 1

Calls 1

addVertexMethod · 0.95

Tested by

no test coverage detected