File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Expand file tree Collapse file tree 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';
2323import * as CLIENT_KILL from '../commands/CLIENT_KILL' ;
2424import * as CLIENT_LIST from '../commands/CLIENT_LIST' ;
2525import * as CLIENT_NO_EVICT from '../commands/CLIENT_NO-EVICT' ;
26+ import * as CLIENT_NO_TOUCH from '../commands/CLIENT_NO-TOUCH' ;
2627import * as CLIENT_PAUSE from '../commands/CLIENT_PAUSE' ;
2728import * as CLIENT_SETNAME from '../commands/CLIENT_SETNAME' ;
2829import * as CLIENT_TRACKING from '../commands/CLIENT_TRACKING' ;
@@ -167,6 +168,8 @@ export default {
167168 clientKill : CLIENT_KILL ,
168169 'CLIENT_NO-EVICT' : CLIENT_NO_EVICT ,
169170 clientNoEvict : CLIENT_NO_EVICT ,
171+ 'CLIENT_NO-TOUCH' : CLIENT_NO_TOUCH ,
172+ clientNoTouch : CLIENT_NO_TOUCH ,
170173 CLIENT_LIST ,
171174 clientList : CLIENT_LIST ,
172175 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