@@ -60,14 +60,16 @@ export class RedisClientMock extends EventEmitter {
6060 // noinspection JSUnusedGlobalSymbols
6161 public end ( ) { }
6262 // noinspection JSUnusedGlobalSymbols
63- public quit ( ) { }
63+ public quit ( ) {
64+ return new Promise ( resolve => resolve ( undefined ) ) ;
65+ }
6466
6567 // noinspection JSMethodCanBeStatic
66- public set ( ...args : any [ ] ) : number {
68+ public set ( ...args : any [ ] ) : Promise < number > {
6769 const [ key , val ] = args ;
6870 RedisClientMock . __keys [ key ] = val ;
6971 this . cbExecute ( args . pop ( ) , null , 1 ) ;
70- return 1 ;
72+ return new Promise ( resolve => resolve ( 1 ) ) ;
7173 }
7274
7375 // noinspection JSUnusedGlobalSymbols,JSMethodCanBeStatic
@@ -230,14 +232,14 @@ export class RedisClientMock extends EventEmitter {
230232 }
231233
232234 // noinspection JSUnusedGlobalSymbols,JSMethodCanBeStatic
233- public psubscribe ( ...args : any [ ] ) : number {
235+ public psubscribe ( ...args : any [ ] ) : Promise < number > {
234236 this . cbExecute ( args . pop ( ) , null , 1 ) ;
235- return 1 ;
237+ return new Promise ( resolve => resolve ( 1 ) ) ;
236238 }
237239
238- public punsubscribe ( ...args : any [ ] ) : number {
240+ public punsubscribe ( ...args : any [ ] ) : Promise < number > {
239241 this . cbExecute ( args . pop ( ) , null , 1 ) ;
240- return 1 ;
242+ return new Promise ( resolve => resolve ( 1 ) ) ;
241243 }
242244
243245 // noinspection JSUnusedGlobalSymbols,JSMethodCanBeStatic
@@ -247,7 +249,7 @@ export class RedisClientMock extends EventEmitter {
247249 }
248250
249251 // noinspection JSUnusedGlobalSymbols,JSMethodCanBeStatic
250- public del ( ...args : any [ ] ) : number {
252+ public del ( ...args : any [ ] ) : Promise < number > {
251253 const self = RedisClientMock ;
252254 let count = 0 ;
253255 for ( let key of args ) {
@@ -261,7 +263,7 @@ export class RedisClientMock extends EventEmitter {
261263 }
262264 }
263265 this . cbExecute ( args . pop ( ) , count ) ;
264- return count ;
266+ return new Promise ( resolve => resolve ( count ) ) ;
265267 }
266268
267269 // noinspection JSUnusedGlobalSymbols
@@ -303,8 +305,8 @@ export class RedisClientMock extends EventEmitter {
303305 }
304306
305307 // noinspection JSUnusedGlobalSymbols,JSMethodCanBeStatic
306- public config ( ) : boolean {
307- return true ;
308+ public config ( ) : Promise < boolean > {
309+ return new Promise ( resolve => resolve ( true ) ) ;
308310 }
309311
310312 private cbExecute ( cb : any , ...args : any [ ] ) : void {
0 commit comments