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 11import * as ADD from './ADD' ;
2+ import * as CARD from './CARD' ;
23import * as EXISTS from './EXISTS' ;
34import * as INFO from './INFO' ;
45import * as INSERT from './INSERT' ;
@@ -11,6 +12,8 @@ import * as SCANDUMP from './SCANDUMP';
1112export default {
1213 ADD ,
1314 add : ADD ,
15+ CARD ,
16+ card : CARD ,
1417 EXISTS ,
1518 exists : EXISTS ,
1619 INFO ,
You can’t perform that action at this time.
0 commit comments