File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
packages/bloom/lib/commands/bloom Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { strict as assert } from 'assert' ;
2
+ import testUtils , { GLOBAL } from '../../test-utils' ;
3
+ import { transformArguments } from './CARD' ;
4
+
5
+ describe ( 'BF CARD' , ( ) => {
6
+ it ( 'transformArguments' , ( ) => {
7
+ assert . deepEqual (
8
+ transformArguments ( 'bloom' ) ,
9
+ [ 'BF.CARD' , 'bloom' ]
10
+ ) ;
11
+ } ) ;
12
+
13
+ testUtils . testWithClient ( 'client.bf.card' , async client => {
14
+ assert . equal (
15
+ await client . bf . card ( 'key' ) ,
16
+ 0
17
+ ) ;
18
+ } , GLOBAL . SERVERS . OPEN ) ;
19
+ } ) ;
Original file line number Diff line number Diff line change
1
+ export const FIRST_KEY_INDEX = 1 ;
2
+
3
+ export const IS_READ_ONLY = true ;
4
+
5
+ export function transformArguments ( key : string ) : Array < string > {
6
+ return [ 'BF.CARD' , key ] ;
7
+ }
8
+
9
+ export declare function transformReply ( ) : number ;
Original file line number Diff line number Diff line change 1
1
import * as ADD from './ADD' ;
2
+ import * as CARD from './CARD' ;
2
3
import * as EXISTS from './EXISTS' ;
3
4
import * as INFO from './INFO' ;
4
5
import * as INSERT from './INSERT' ;
@@ -11,6 +12,8 @@ import * as SCANDUMP from './SCANDUMP';
11
12
export default {
12
13
ADD ,
13
14
add : ADD ,
15
+ CARD ,
16
+ card : CARD ,
14
17
EXISTS ,
15
18
exists : EXISTS ,
16
19
INFO ,
You can’t perform that action at this time.
0 commit comments