You've already forked node-redis
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:
@@ -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
|
||||
});
|
||||
});
|
||||
|
@@ -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];
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user