You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
support command LATENCY DOCTOR (#2053)
* The Latency Doctor Command has been added to the project * Update LATENCY_DOCTOR.ts * Update LATENCY_DOCTOR.spec.ts * Update LATENCY_DOCTOR.spec.ts Co-authored-by: QuentinRK <q.rankin@outlook.com> Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
This commit is contained in:
19
packages/client/lib/commands/LATENCY_DOCTOR.spec.ts
Normal file
19
packages/client/lib/commands/LATENCY_DOCTOR.spec.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import {strict as assert} from 'assert';
|
||||
import testUtils, {GLOBAL} from '../test-utils';
|
||||
import { transformArguments } from './LATENCY_DOCTOR';
|
||||
|
||||
describe('LATENCY DOCTOR', () => {
|
||||
it('transformArguments', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments(),
|
||||
['LATENCY', 'DOCTOR']
|
||||
);
|
||||
});
|
||||
|
||||
testUtils.testWithClient('client.latencyDoctor', async client => {
|
||||
assert.equal(
|
||||
typeof (await client.latencyDoctor()),
|
||||
'string'
|
||||
);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
5
packages/client/lib/commands/LATENCY_DOCTOR.ts
Normal file
5
packages/client/lib/commands/LATENCY_DOCTOR.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export function transformArguments(): Array<string> {
|
||||
return ['LATENCY', 'DOCTOR'];
|
||||
}
|
||||
|
||||
export declare function transformReply(): string;
|
Reference in New Issue
Block a user