-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcommand-getkeys.test.ts
34 lines (25 loc) · 1.13 KB
/
command-getkeys.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { createNodeRedisClient } from "../../../src";
import { fuzzify } from "../../fuzzify";
const client = createNodeRedisClient();
beforeAll(async () => {
await client.ping();
});
beforeEach(async () => {
await client.flushall();
});
test("docs/redis-doc/commands/command-getkeys.md example 1", async () => {
const outputs: Record<string, unknown> = {};
// Error decoding command `COMMAND GETKEYS MSET a b c d e f`:
// decoding COMMAND overload 0 ():
// Tokens remain but no target args left! Tokens: GETKEYS,MSET,a,b,c,d,e,f
// ---
// Error decoding command `COMMAND GETKEYS EVAL "not consulted" 3 key1 key2 key3 arg1 arg2 arg3 argN`:
// decoding COMMAND overload 0 ():
// Tokens remain but no target args left! Tokens: GETKEYS,EVAL,not consulted,3,key1,key2,key3,arg1,arg2,arg3,argN
// ---
// Error decoding command `COMMAND GETKEYS SORT mylist ALPHA STORE outlist`:
// decoding COMMAND overload 0 ():
// Tokens remain but no target args left! Tokens: GETKEYS,SORT,mylist,ALPHA,STORE,outlist
// ---
expect(fuzzify(outputs, __filename)).toMatchInlineSnapshot(`Object {}`);
});