1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +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,27 +1,23 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './LREM';
import LREM from './LREM';
describe('LREM', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 0, 'element'),
['LREM', 'key', '0', 'element']
);
});
it('transformArguments', () => {
assert.deepEqual(
LREM.transformArguments('key', 0, 'element'),
['LREM', 'key', '0', 'element']
);
});
testUtils.testWithClient('client.lRem', async client => {
assert.equal(
await client.lRem('key', 0, 'element'),
0
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.lRem', async cluster => {
assert.equal(
await cluster.lRem('key', 0, 'element'),
0
);
}, GLOBAL.CLUSTERS.OPEN);
testUtils.testAll('lRem', async client => {
assert.equal(
await client.lRem('key', 0, 'element'),
0
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});