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