import { describe, it } from 'node:test' import assert from 'node:assert' import { parse } from '../../src/parser.js' import { statement } from '../../src/query/return.js' import { Alias } from '../../src/query/types.js' describe('return parser', () => { it('should collect a single value for a query to return', () => { const result = parse(statement, 'RETURN folklore AS f') assert(result.isOk()) const [[selected]] = result.value assert.deepStrictEqual(selected, new Alias('folklore', 'f')) }) //it('should collect multiple values for a query to return', () => { // const result = parse(statement, 'RETURN sybil, mercury, rowan') // console.log(result.error.state[0]) // assert(result.isOk()) // const [[selected]] = result.value // assert.deepStrictEqual(selected, ['sybil', 'mercury', 'rowan']) //}) })