fix test imports
This commit is contained in:
parent
effd541093
commit
6b3539e3c8
7 changed files with 14 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
import { describe, it } from 'node:test'
|
||||
import assert from '../assert.js'
|
||||
import { Alias, Identifier, Literal, ObjectPath } from '../../src/query/types.js'
|
||||
import { baseValue, literal, value } from '../../src/query/common.js'
|
||||
import { Alias, Identifier, Literal, ObjectPath } from '../../src/query-parser/types.js'
|
||||
import { baseValue, literal, value } from '../../src/query-parser/common.js'
|
||||
|
||||
describe('common parser library', () => {
|
||||
const literals = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { describe, it } from 'node:test'
|
||||
import assert from '../assert.js'
|
||||
import { node, edge, matchClause } from '../../src/query/match.js'
|
||||
import { node, edge, matchClause } from '../../src/query-parser/match.js'
|
||||
import { makeDirectedEdge, makeEdge, makeNode, makeRelationship } from '../utils.js'
|
||||
|
||||
describe('node', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, it } from 'node:test'
|
||||
import assert from '../assert.js'
|
||||
import { query } from '../../src/query/index.js'
|
||||
import { Alias, Identifier, ObjectPath, Query, ReturnValues, SelectedGraph } from '../../src/query/types.js'
|
||||
import { query } from '../../src/query-parser/index.js'
|
||||
import { Alias, Identifier, ObjectPath, Query, ReturnValues, SelectedGraph } from '../../src/query-parser/types.js'
|
||||
import { makeNode, makeRelationship, makeRightEdge } from '../utils.js'
|
||||
|
||||
const path = (...v) => new ObjectPath(...v)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, it } from 'node:test'
|
||||
import assert from '../assert.js'
|
||||
import { returnClause } from '../../src/query/return.js'
|
||||
import { Alias, Identifier, Literal, ReturnValues } from '../../src/query/types.js'
|
||||
import { returnClause } from '../../src/query-parser/return.js'
|
||||
import { Alias, Identifier, Literal, ReturnValues } from '../../src/query-parser/types.js'
|
||||
|
||||
describe('RETURN keyword', () => {
|
||||
it('should collect a single value for a query to return', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, it } from 'node:test'
|
||||
import assert from '../assert.js'
|
||||
import { useClause } from '../../src/query/use.js'
|
||||
import { Identifier } from '../../src/query/types.js'
|
||||
import { useClause } from '../../src/query-parser/use.js'
|
||||
import { Identifier } from '../../src/query-parser/types.js'
|
||||
|
||||
describe('USE keyword', () => {
|
||||
it('should select a graph to query', () => {
|
||||
|
|
|
@ -55,7 +55,10 @@ describe('query', () => {
|
|||
|
||||
const q = 'MATCH (player:Player)-[e1:Knows]->(a:NPC)-[e2:Knows]->(b:NPC) RETURN player, e1, a, e2, b'
|
||||
const result = query(q, engine)
|
||||
console.log(`parsing ${q}\n`, result.unwrap())
|
||||
assert.deepEqual(result.unwrap(), [
|
||||
{ player: 0, e1: 4, a: 1, e2: 7, b: 2 },
|
||||
{ player: 0, e1: 4, a: 1, e2: 8, b: 3 }
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { KeyValuePair, Name, Label, Identifier, Literal, Edge, Node, DirectedEdge, Relationship } from '../src/query/types.js'
|
||||
import { KeyValuePair, Name, Label, Identifier, Literal, Edge, Node, DirectedEdge, Relationship } from '../src/query-parser/types.js'
|
||||
|
||||
export const keyValuePair = ([k, v]) => new KeyValuePair(new Name(new Identifier(k)), new Literal(v))
|
||||
|
||||
|
|
Loading…
Reference in a new issue