File tree 2 files changed +6
-6
lines changed
packages/client/lib/commands 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,21 @@ import { transformArguments } from './LINDEX';
5
5
describe ( 'LINDEX' , ( ) => {
6
6
it ( 'transformArguments' , ( ) => {
7
7
assert . deepEqual (
8
- transformArguments ( 'key' , 'element' ) ,
9
- [ 'LINDEX' , 'key' , 'element ' ]
8
+ transformArguments ( 'key' , 0 ) ,
9
+ [ 'LINDEX' , 'key' , '0 ' ]
10
10
) ;
11
11
} ) ;
12
12
13
13
testUtils . testWithClient ( 'client.lIndex' , async client => {
14
14
assert . equal (
15
- await client . lIndex ( 'key' , 'element' ) ,
15
+ await client . lIndex ( 'key' , 0 ) ,
16
16
null
17
17
) ;
18
18
} , GLOBAL . SERVERS . OPEN ) ;
19
19
20
20
testUtils . testWithCluster ( 'cluster.lIndex' , async cluster => {
21
21
assert . equal (
22
- await cluster . lIndex ( 'key' , 'element' ) ,
22
+ await cluster . lIndex ( 'key' , 0 ) ,
23
23
null
24
24
) ;
25
25
} , GLOBAL . CLUSTERS . OPEN ) ;
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ export const FIRST_KEY_INDEX = 1;
2
2
3
3
export const IS_READ_ONLY = true ;
4
4
5
- export function transformArguments ( key : string , element : string ) : Array < string > {
6
- return [ 'LINDEX' , key , element ] ;
5
+ export function transformArguments ( key : string , index : number ) : Array < string > {
6
+ return [ 'LINDEX' , key , index . toString ( ) ] ;
7
7
}
8
8
9
9
export declare function transformReply ( ) : string | null ;
You can’t perform that action at this time.
0 commit comments