1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

some more commands

This commit is contained in:
Leibale
2023-04-30 10:33:05 -04:00
parent 53b9397a78
commit 88333c01de
25 changed files with 458 additions and 491 deletions

View File

@@ -1,26 +1,22 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './RPOPLPUSH';
import RPOPLPUSH from './RPOPLPUSH';
describe('RPOPLPUSH', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('source', 'destination'),
['RPOPLPUSH', 'source', 'destination']
);
});
it('transformArguments', () => {
assert.deepEqual(
RPOPLPUSH.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);
testUtils.testAll('rPopLPush', async client => {
assert.equal(
await client.rPopLPush('{tag}source', '{tag}destination'),
null
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});