1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

add cluster.duplicate, add some tests

This commit is contained in:
leibale
2021-09-09 16:58:31 -04:00
parent 18ad329ccc
commit 1413a69a6b
5 changed files with 58 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster, describeHandleMinimumRedisVersion } from '../test-utils';
import { transformArguments } from './GEOSEARCHSTORE';
import { transformArguments, transformReply } from './GEOSEARCHSTORE';
describe('GEOSEARCHSTORE', () => {
describeHandleMinimumRedisVersion([6, 2]);
@@ -40,6 +40,13 @@ describe('GEOSEARCHSTORE', () => {
});
});
it('transformReply with empty array (https://github.com/redis/redis/issues/9261)', () => {
assert.throws(
() => (transformReply as any)([]),
TypeError
);
});
itWithClient(TestRedisServers.OPEN, 'client.geoSearchStore', async client => {
await client.geoAdd('source', {
longitude: 1,