File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
packages/client/lib/client Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,20 @@ describe('Client', () => {
294
294
}
295
295
}
296
296
} ) ;
297
+
298
+ testUtils . testWithClient ( 'client.multi.{command}.exec should flatten array arguments' , async client => {
299
+ assert . deepEqual (
300
+ await client . multi ( )
301
+ . sAdd ( 'a' , [ 'b' , 'c' ] )
302
+ . v4 . exec ( ) ,
303
+ [ 2 ] )
304
+ } , {
305
+ ...GLOBAL . SERVERS . OPEN ,
306
+ clientOptions : {
307
+ legacyMode : true
308
+ }
309
+ } ) ;
310
+
297
311
} ) ;
298
312
299
313
describe ( 'events' , ( ) => {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export default class RedisClientMultiCommand {
87
87
#defineLegacyCommand( name : string ) : void {
88
88
this . v4 [ name ] = ( this as any ) [ name ] . bind ( this . v4 ) ;
89
89
( this as any ) [ name ] =
90
- ( ...args : Array < unknown > ) : void => ( this as any ) . addCommand ( name , args ) ;
90
+ ( ...args : Array < unknown > ) : void => ( this as any ) . addCommand ( name , ... args ) ;
91
91
}
92
92
93
93
commandsExecutor ( command : RedisCommand , args : Array < unknown > ) : this {
You can’t perform that action at this time.
0 commit comments