1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-11 22:42:42 +03:00
Files
node-redis/lib/commands/ZDIFFSTORE.spec.ts
2021-06-15 19:27:41 -04:00

29 lines
851 B
TypeScript

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