1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/lib/commands/PFMERGE.spec.ts
2021-06-10 12:43:28 -04:00

29 lines
835 B
TypeScript

import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments } from './PFMERGE';
describe('PFMERGE', () => {
describe('transformArguments', () => {
it('string', () => {
assert.deepEqual(
transformArguments('destination', 'source'),
['PFMERGE', 'destination', 'source']
);
});
it('array', () => {
assert.deepEqual(
transformArguments('destination', ['1', '2']),
['PFMERGE', 'destination', '1', '2']
);
});
});
itWithClient(TestRedisServers.OPEN, 'client.pfMerge', async client => {
assert.equal(
await client.pfMerge('destination', 'source'),
'OK'
);
});
});