1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/graph/lib/commands/RO_QUERY.spec.ts
Leibale 3fa7717a7d graph
2023-07-10 12:20:40 -04:00

20 lines
643 B
TypeScript

import { strict as assert } from '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);
});