1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/lib/commands/COMMAND_GETKEYS.spec.ts
2021-10-04 17:30:18 -04:00

27 lines
834 B
TypeScript

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']
);
});
});