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

fix SUNION

This commit is contained in:
dovi
2023-05-03 18:40:36 -04:00
parent 92b38a1f37
commit 627c9122ef
3 changed files with 41 additions and 38 deletions

View File

@@ -1,28 +1,31 @@
// import { strict as assert } from 'assert'; import { strict as assert } from 'assert';
// import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
// import { transformArguments } from './SUNION'; import SUNION from './SUNION';
// describe('SUNION', () => { describe('SUNION', () => {
// describe('transformArguments', () => { describe('transformArguments', () => {
// it('string', () => { it('string', () => {
// assert.deepEqual( assert.deepEqual(
// transformArguments('key'), SUNION.transformArguments('key'),
// ['SUNION', 'key'] ['SUNION', 'key']
// ); );
// }); });
// it('array', () => { it('array', () => {
// assert.deepEqual( assert.deepEqual(
// transformArguments(['1', '2']), SUNION.transformArguments(['1', '2']),
// ['SUNION', '1', '2'] ['SUNION', '1', '2']
// ); );
// }); });
// }); });
// testUtils.testWithClient('client.sUnion', async client => { testUtils.testAll('sUnion', async client => {
// assert.deepEqual( assert.deepEqual(
// await client.sUnion('key'), await client.sUnion('key'),
// [] []
// ); );
// }, GLOBAL.SERVERS.OPEN); }, {
// }); client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});

View File

@@ -1,14 +1,11 @@
// import { RedisCommandArgument, RedisCommandArguments } from '.'; import { ArrayReply, BlobStringReply, Command } from '../RESP/types';
// import { pushVariadicArguments } from './generic-transformers'; import { RedisVariadicArgument, pushVariadicArguments } from './generic-transformers';
// export const FIRST_KEY_INDEX = 1; export default {
FIRST_KEY_INDEX: 1,
// export const IS_READ_ONLY = true; IS_READ_ONLY: true,
transformArguments(keys: RedisVariadicArgument) {
// export function transformArguments( return pushVariadicArguments(['SUNION'], keys);
// keys: RedisCommandArgument | Array<RedisCommandArgument> },
// ): RedisCommandArguments { transformReply: undefined as unknown as () => ArrayReply<BlobStringReply>
// return pushVariadicArguments(['SUNION'], keys); } as const satisfies Command;
// }
// export declare function transformReply(): Array<RedisCommandArgument>;

View File

@@ -151,6 +151,7 @@ import SRANDMEMBER from './SRANDMEMBER';
import SREM from './SREM'; import SREM from './SREM';
import SSCAN from './SSCAN'; import SSCAN from './SSCAN';
import STRLEN from './STRLEN'; import STRLEN from './STRLEN';
import SUNION from './SUNION';
import TOUCH from './TOUCH'; import TOUCH from './TOUCH';
import TTL from './TTL'; import TTL from './TTL';
import TYPE from './TYPE'; import TYPE from './TYPE';
@@ -504,6 +505,8 @@ export default {
sScan: SSCAN, sScan: SSCAN,
STRLEN, STRLEN,
strLen: STRLEN, strLen: STRLEN,
SUNION,
sUnion: SUNION,
TOUCH, TOUCH,
touch: TOUCH, touch: TOUCH,
TTL, TTL,