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

27 lines
800 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './RPOPLPUSH';
describe('RPOPLPUSH', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('source', 'destination'),
['RPOPLPUSH', 'source', 'destination']
);
});
testUtils.testWithClient('client.rPopLPush', async client => {
assert.equal(
await client.rPopLPush('source', 'destination'),
null
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.rPopLPush', async cluster => {
assert.equal(
await cluster.rPopLPush('{tag}source', '{tag}destination'),
null
);
}, GLOBAL.CLUSTERS.OPEN);
});