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/PFMERGE.spec.ts

29 lines
832 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } 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']
);
});
});
testUtils.testWithClient('client.pfMerge', async client => {
assert.equal(
await client.pfMerge('destination', 'source'),
'OK'
);
}, GLOBAL.SERVERS.OPEN);
});