1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

fix KEYS spec

This commit is contained in:
dovi
2023-05-02 20:22:11 -04:00
parent 2ea068ac77
commit d810ce644b
3 changed files with 13 additions and 6 deletions

View File

@@ -2,10 +2,13 @@ import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
describe('KEYS', () => {
testUtils.testWithClient('client.keys', async client => {
assert.deepEqual(
await client.keys('pattern'),
[]
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testAll('client.keys', async client => {
assert.deepEqual(
await client.keys('pattern'),
[]
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});

View File

@@ -1,6 +1,7 @@
import { RedisArgument, ArrayReply, BlobStringReply, Command } from '../RESP/types';
export default {
FIRST_KEY_INDEX: undefined,
IS_READ_ONLY: true,
transformArguments(pattern: RedisArgument) {
return ['KEYS', pattern];

View File

@@ -72,6 +72,7 @@ import INCR from './INCR';
import INCRBY from './INCRBY';
import INCRBYFLOAT from './INCRBYFLOAT';
import INFO from './INFO';
import KEYS from './KEYS';
// import LCS_IDX_WITHMATCHLEN from './LCS_IDX_WITHMATCHLEN';
// import LCS_IDX from './LCS_IDX';
import LCS_LEN from './LCS_LEN';
@@ -335,6 +336,8 @@ export default {
incrByFloat: INCRBYFLOAT,
INFO,
info: INFO,
KEYS,
keys: KEYS,
// LCS_IDX_WITHMATCHLEN,
// LCS_IDX,
LCS_LEN,