1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +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'; import testUtils, { GLOBAL } from '../test-utils';
describe('KEYS', () => { describe('KEYS', () => {
testUtils.testWithClient('client.keys', async client => { testUtils.testAll('client.keys', async client => {
assert.deepEqual( assert.deepEqual(
await client.keys('pattern'), await client.keys('pattern'),
[] []
); );
}, GLOBAL.SERVERS.OPEN); }, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
}); });

View File

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

View File

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