You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
27 lines
714 B
TypeScript
27 lines
714 B
TypeScript
import { strict as assert } from 'node:assert';
|
|
import testUtils, { GLOBAL } from '../test-utils';
|
|
import LATENCY_GRAPH from './LATENCY_GRAPH';
|
|
|
|
describe('LATENCY GRAPH', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
LATENCY_GRAPH.transformArguments('command'),
|
|
[
|
|
'LATENCY',
|
|
'GRAPH',
|
|
'command'
|
|
]
|
|
);
|
|
});
|
|
|
|
testUtils.testWithClient('client.latencyGraph', async client => {
|
|
const [,, reply] = await Promise.all([
|
|
client.configSet('latency-monitor-threshold', '1'),
|
|
client.sendCommand(['DEBUG', 'SLEEP', '0.001']),
|
|
client.latencyGraph('command')
|
|
]);
|
|
|
|
assert.equal(typeof reply, 'string');
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
});
|