1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00

some more commands

This commit is contained in:
Leibale
2023-04-30 10:08:25 -04:00
parent 2c4dc95a44
commit 53b9397a78
8 changed files with 259 additions and 243 deletions

View File

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