File tree 3 files changed +44
-0
lines changed
3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import * as CLIENT_ID from '../commands/CLIENT_ID';
23
23
import * as CLIENT_KILL from '../commands/CLIENT_KILL' ;
24
24
import * as CLIENT_LIST from '../commands/CLIENT_LIST' ;
25
25
import * as CLIENT_NO_EVICT from '../commands/CLIENT_NO-EVICT' ;
26
+ import * as CLIENT_NO_TOUCH from '../commands/CLIENT_NO-TOUCH' ;
26
27
import * as CLIENT_PAUSE from '../commands/CLIENT_PAUSE' ;
27
28
import * as CLIENT_SETNAME from '../commands/CLIENT_SETNAME' ;
28
29
import * as CLIENT_TRACKING from '../commands/CLIENT_TRACKING' ;
@@ -167,6 +168,8 @@ export default {
167
168
clientKill : CLIENT_KILL ,
168
169
'CLIENT_NO-EVICT' : CLIENT_NO_EVICT ,
169
170
clientNoEvict : CLIENT_NO_EVICT ,
171
+ 'CLIENT_NO-TOUCH' : CLIENT_NO_TOUCH ,
172
+ clientNoTouch : CLIENT_NO_TOUCH ,
170
173
CLIENT_LIST ,
171
174
clientList : CLIENT_LIST ,
172
175
CLIENT_PAUSE ,
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 './CLIENT_NO-TOUCH' ;
4
+
5
+ describe ( 'CLIENT NO-TOUCH' , ( ) => {
6
+ testUtils . isVersionGreaterThanHook ( [ 7 , 2 ] ) ;
7
+
8
+ describe ( 'transformArguments' , ( ) => {
9
+ it ( 'true' , ( ) => {
10
+ assert . deepEqual (
11
+ transformArguments ( true ) ,
12
+ [ 'CLIENT' , 'NO-TOUCH' , 'ON' ]
13
+ ) ;
14
+ } ) ;
15
+
16
+ it ( 'false' , ( ) => {
17
+ assert . deepEqual (
18
+ transformArguments ( false ) ,
19
+ [ 'CLIENT' , 'NO-TOUCH' , 'OFF' ]
20
+ ) ;
21
+ } ) ;
22
+ } ) ;
23
+
24
+ testUtils . testWithClient ( 'client.clientNoTouch' , async client => {
25
+ assert . equal (
26
+ await client . clientNoTouch ( true ) ,
27
+ 'OK'
28
+ ) ;
29
+ } , GLOBAL . SERVERS . OPEN ) ;
30
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { RedisCommandArguments } from '.' ;
2
+
3
+ export function transformArguments ( value : boolean ) : RedisCommandArguments {
4
+ return [
5
+ 'CLIENT' ,
6
+ 'NO-TOUCH' ,
7
+ value ? 'ON' : 'OFF'
8
+ ] ;
9
+ }
10
+
11
+ export declare function transformReply ( ) : 'OK' | Buffer ;
You can’t perform that action at this time.
0 commit comments