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,35 +1,28 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './GEORADIUS_RO';
import GEORADIUS_RO from './GEORADIUS_RO';
describe('GEORADIUS_RO', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', {
longitude: 1,
latitude: 2
}, 3 , 'm'),
['GEORADIUS_RO', 'key', '1', '2', '3', 'm']
);
});
it('transformArguments', () => {
assert.deepEqual(
GEORADIUS_RO.transformArguments('key', {
longitude: 1,
latitude: 2
}, 3, 'm'),
['GEORADIUS_RO', 'key', '1', '2', '3', 'm']
);
});
testUtils.testWithClient('client.geoRadiusRo', async client => {
assert.deepEqual(
await client.geoRadiusRo('key', {
longitude: 1,
latitude: 2
}, 3 , 'm'),
[]
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.geoRadiusRo', async cluster => {
assert.deepEqual(
await cluster.geoRadiusRo('key', {
longitude: 1,
latitude: 2
}, 3 , 'm'),
[]
);
}, GLOBAL.CLUSTERS.OPEN);
testUtils.testAll('geoRadiusRo', async client => {
assert.deepEqual(
await client.geoRadiusRo('key', {
longitude: 1,
latitude: 2
}, 3, 'm'),
[]
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});