(properties: Record<string, any>)
| 65 | |
| 66 | // Helper function to create mock TraversalPath objects for testing |
| 67 | function createMockPath(properties: Record<string, any>): TraversalPath<undefined, any, []> { |
| 68 | // Create a mock vertex for testing |
| 69 | // TraversalPath.property() checks if value is an Element, then object with direct properties |
| 70 | // We need to add properties directly on the object for the fallback case to work |
| 71 | const mockVertex = { |
| 72 | id: Math.random().toString(), |
| 73 | label: "Person", |
| 74 | get: (key: string) => properties[key], |
| 75 | properties: () => properties, |
| 76 | // Add properties directly for TraversalPath.property() to work |
| 77 | ...properties, |
| 78 | }; |
| 79 | |
| 80 | return new TraversalPath(undefined, mockVertex, []); |
| 81 | } |
| 82 | |
| 83 | function setupOrderByGraph(): Graph<TestSchema> { |
| 84 | const graph = new Graph({ |
no test coverage detected