1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
Files
node-redis/packages/client/lib/commands/LATENCY_GRAPH.spec.ts
2023-09-19 19:23:24 -04:00

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);
});