1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00

fix GEO* commands

This commit is contained in:
Leibale
2023-05-08 11:04:22 +03:00
parent d2e244a77d
commit 6a0b4db4f7
37 changed files with 1115 additions and 990 deletions

View File

@@ -1,26 +1,22 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './GEORADIUSBYMEMBER_RO';
import GEORADIUSBYMEMBER_RO from './GEORADIUSBYMEMBER_RO';
describe('GEORADIUSBYMEMBER_RO', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 'member', 3 , 'm'),
['GEORADIUSBYMEMBER_RO', 'key', 'member', '3', 'm']
);
});
it('transformArguments', () => {
assert.deepEqual(
GEORADIUSBYMEMBER_RO.transformArguments('key', 'member', 3, 'm'),
['GEORADIUSBYMEMBER_RO', 'key', 'member', '3', 'm']
);
});
testUtils.testWithClient('client.geoRadiusByMemberRo', async client => {
assert.deepEqual(
await client.geoRadiusByMemberRo('key', 'member', 3 , 'm'),
[]
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.geoRadiusByMemberRo', async cluster => {
assert.deepEqual(
await cluster.geoRadiusByMemberRo('key', 'member', 3 , 'm'),
[]
);
}, GLOBAL.CLUSTERS.OPEN);
testUtils.testAll('geoRadiusByMemberRo', async client => {
assert.deepEqual(
await client.geoRadiusByMemberRo('key', 'member', 3, 'm'),
[]
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});