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,28 +1,24 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './LPOP_COUNT';
import LPOP_COUNT from './LPOP_COUNT';
describe('LPOP COUNT', () => {
testUtils.isVersionGreaterThanHook([6, 2]);
testUtils.isVersionGreaterThanHook([6, 2]);
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 1),
['LPOP', 'key', '1']
);
});
it('transformArguments', () => {
assert.deepEqual(
LPOP_COUNT.transformArguments('key', 1),
['LPOP', 'key', '1']
);
});
testUtils.testWithClient('client.lPopCount', async client => {
assert.equal(
await client.lPopCount('key', 1),
null
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.lPopCount', async cluster => {
assert.equal(
await cluster.lPopCount('key', 1),
null
);
}, GLOBAL.CLUSTERS.OPEN);
testUtils.testAll('lPopCount', async client => {
assert.equal(
await client.lPopCount('key', 1),
null
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});