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

fix GEOSEARCH & GEOSEARCHSTORE

This commit is contained in:
leibale
2021-07-19 16:59:40 -04:00
parent a10b276144
commit 81456fc1fc
3 changed files with 9 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils'; import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster, describeHandleMinimumRedisVersion } from '../test-utils';
import { transformArguments } from './GEOSEARCH'; import { transformArguments } from './GEOSEARCH';
describe('GEOSEARCH', () => { describe('GEOSEARCH', () => {
describeHandleMinimumRedisVersion([6, 2]);
it('transformArguments', () => { it('transformArguments', () => {
assert.deepEqual( assert.deepEqual(
transformArguments('key', 'member', { transformArguments('key', 'member', {

View File

@@ -1,8 +1,10 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils'; import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster, describeHandleMinimumRedisVersion } from '../test-utils';
import { transformArguments } from './GEOSEARCHSTORE'; import { transformArguments } from './GEOSEARCHSTORE';
describe('GEOSEARCHSTORE', () => { describe('GEOSEARCHSTORE', () => {
describeHandleMinimumRedisVersion([6, 2]);
it('transformArguments', () => { it('transformArguments', () => {
assert.deepEqual( assert.deepEqual(
transformArguments('destination', 'source', 'member', { transformArguments('destination', 'source', 'member', {

View File

@@ -1,10 +1,12 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'assert';
import { TransformArgumentsReply } from '.'; import { TransformArgumentsReply } from '.';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils'; import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster, describeHandleMinimumRedisVersion } from '../test-utils';
import { GeoReplyWith } from './generic-transformers'; import { GeoReplyWith } from './generic-transformers';
import { transformArguments } from './GEOSEARCH_WITH'; import { transformArguments } from './GEOSEARCH_WITH';
describe('GEOSEARCH WITH', () => { describe('GEOSEARCH WITH', () => {
describeHandleMinimumRedisVersion([6, 2]);
it('transformArguments', () => { it('transformArguments', () => {
const expectedReply: TransformArgumentsReply = ['GEOSEARCH', 'key', 'FROMMEMBER', 'member', 'BYRADIUS', '1', 'm', 'WITHDIST'] const expectedReply: TransformArgumentsReply = ['GEOSEARCH', 'key', 'FROMMEMBER', 'member', 'BYRADIUS', '1', 'm', 'WITHDIST']
expectedReply.preserve = ['WITHDIST']; expectedReply.preserve = ['WITHDIST'];