1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00
Files
node-redis/packages/client/lib/commands/SINTERSTORE.spec.ts

29 lines
844 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './SINTERSTORE';
describe('SINTERSTORE', () => {
describe('transformArguments', () => {
it('string', () => {
assert.deepEqual(
transformArguments('destination', 'key'),
['SINTERSTORE', 'destination', 'key']
);
});
it('array', () => {
assert.deepEqual(
transformArguments('destination', ['1', '2']),
['SINTERSTORE', 'destination', '1', '2']
);
});
});
testUtils.testWithClient('client.sInterStore', async client => {
assert.equal(
await client.sInterStore('destination', 'key'),
0
);
}, GLOBAL.SERVERS.OPEN);
});