import { describe, it } from 'node:test' import assert from 'node:assert' import { parse } from '../../src/parser.js' import { statement } from '../../src/query/use.js' describe('use parser', () => { it('should select a graph to query', () => { const result = parse(statement, 'USE default') assert(result.isOk()) const [[selected]] = result.value assert.strictEqual(selected.identifier, 'default') }) it('should return an error if no graph identifier is provided', () => { const result = parse(statement, 'USE') assert(result.isErr()) }) })