You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
27 lines
834 B
TypeScript
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']
|
|
);
|
|
});
|
|
});
|