1
0
mirror of https://github.com/redis/node-redis.git synced 2025-09-01 11:41:56 +03:00

add all COMMAND commands

This commit is contained in:
leibale
2021-10-04 17:30:18 -04:00
parent 5eb06bcaa3
commit 6e7844eca0
11 changed files with 265 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
import { strict as assert } from 'assert';
import { itWithClient, itWithCluster, TestRedisClusters, TestRedisServers } from '../test-utils';
import { transformArguments } from './COMMAND_GETKEYS';
describe('COMMAND GETKEYS', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments(['GET', 'key']),
['COMMAND', 'GETKEYS', 'GET', 'key']
);
});
itWithClient(TestRedisServers.OPEN, 'client.commandGetKeys', async client => {
assert.deepEqual(
await client.commandGetKeys(['GET', 'key']),
['key']
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.commandGetKeys', async cluster => {
assert.deepEqual(
await cluster.commandGetKeys(['GET', 'key']),
['key']
);
});
});