You've already forked node-redis
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:
26
lib/commands/GEODIST.spec.ts
Normal file
26
lib/commands/GEODIST.spec.ts
Normal 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
|
||||
);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user