You've already forked node-redis
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:
26
lib/commands/COMMAND_GETKEYS.spec.ts
Normal file
26
lib/commands/COMMAND_GETKEYS.spec.ts
Normal 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']
|
||||
);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user