1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
Files
node-redis/packages/graph/lib/commands/RO_QUERY.spec.ts
2023-09-18 15:03:07 -04:00

20 lines
648 B
TypeScript

import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils';
import RO_QUERY from './RO_QUERY';
describe('GRAPH.RO_QUERY', () => {
it('transformArguments', () => {
assert.deepEqual(
RO_QUERY.transformArguments('key', 'query'),
['GRAPH.RO_QUERY', 'key', 'query']
);
});
testUtils.testWithClient('client.graph.roQuery', async client => {
const [, { data }] = await Promise.all([
client.graph.query('key', 'RETURN 0'), // make sure to create a graph first
client.graph.roQuery('key', 'RETURN 0')
]);
assert.deepEqual(data, [[0]]);
}, GLOBAL.SERVERS.OPEN);
});