You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
* fix #2189 - add graph --compact support * clean code * fix graph string param escaping * fix "is not assignable to parameter of type 'GraphClientType'" * fix README
This commit is contained in:
@@ -5,18 +5,13 @@ import { transformArguments } from './QUERY';
|
||||
describe('QUERY', () => {
|
||||
it('transformArguments', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('key', '*', 100),
|
||||
['GRAPH.QUERY', 'key', '*', '100']
|
||||
transformArguments('key', 'query'),
|
||||
['GRAPH.QUERY', 'key', 'query']
|
||||
);
|
||||
});
|
||||
|
||||
testUtils.testWithClient('client.graph.query', async client => {
|
||||
await client.graph.query('key',
|
||||
"CREATE (r:human {name:'roi', age:34}), (a:human {name:'amit', age:32}), (r)-[:knows]->(a)"
|
||||
);
|
||||
const reply = await client.graph.query('key',
|
||||
"MATCH (r:human)-[:knows]->(a:human) RETURN r.age, r.name"
|
||||
);
|
||||
assert.equal(reply.data.length, 1);
|
||||
const { data } = await client.graph.query('key', 'RETURN 0');
|
||||
assert.deepEqual(data, [[0]]);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
||||
|
Reference in New Issue
Block a user