1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-17 19:41:06 +03:00

implement some GEO commands, improve scan generic transformer, expose RPUSHX

This commit is contained in:
leibale
2021-07-19 16:39:09 -04:00
parent c72aab2fc2
commit a10b276144
24 changed files with 924 additions and 59 deletions

View File

@@ -0,0 +1,26 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './GEODIST';
describe('GEODIST', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', '1', '2'),
['GEODIST', 'key', '1', '2']
);
});
itWithClient(TestRedisServers.OPEN, 'client.geoDist', async client => {
assert.equal(
await client.geoDist('key', '1', '2'),
null
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.geoDist', async cluster => {
assert.equal(
await cluster.geoDist('key', '1', '2'),
null
);
});
});