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-05-01 06:58:27 -04:00
parent a5d0963fcf
commit 4304f4dba3
22 changed files with 354 additions and 328 deletions

View File

@@ -1,28 +1,24 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './LMOVE';
import LMOVE from './LMOVE';
describe('LMOVE', () => {
testUtils.isVersionGreaterThanHook([6, 2]);
testUtils.isVersionGreaterThanHook([6, 2]);
it('transformArguments', () => {
assert.deepEqual(
transformArguments('source', 'destination', 'LEFT', 'RIGHT'),
['LMOVE', 'source', 'destination', 'LEFT', 'RIGHT']
);
});
it('transformArguments', () => {
assert.deepEqual(
LMOVE.transformArguments('source', 'destination', 'LEFT', 'RIGHT'),
['LMOVE', 'source', 'destination', 'LEFT', 'RIGHT']
);
});
testUtils.testWithClient('client.lMove', async client => {
assert.equal(
await client.lMove('source', 'destination', 'LEFT', 'RIGHT'),
null
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.lMove', async cluster => {
assert.equal(
await cluster.lMove('{tag}source', '{tag}destination', 'LEFT', 'RIGHT'),
null
);
}, GLOBAL.CLUSTERS.OPEN);
testUtils.testAll('lMove', async client => {
assert.equal(
await client.lMove('source', 'destination', 'LEFT', 'RIGHT'),
null
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});