You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
31 lines
996 B
TypeScript
31 lines
996 B
TypeScript
import { strict as assert } from 'assert';
|
|
import { itWithClient, TestRedisServers } from '../test-utils';
|
|
import { transformArguments } from './COMMAND_INFO';
|
|
import { CommandCategories, CommandFlags } from './generic-transformers';
|
|
|
|
describe('COMMAND INFO', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
transformArguments(['PING']),
|
|
['COMMAND', 'INFO', 'PING']
|
|
);
|
|
});
|
|
|
|
itWithClient(TestRedisServers.OPEN, 'client.commandInfo', async client => {
|
|
assert.deepEqual(
|
|
await client.commandInfo(['PING']),
|
|
[{
|
|
name: 'ping',
|
|
arity: -1,
|
|
flags: new Set([CommandFlags.STALE, CommandFlags.FAST]),
|
|
firstKeyIndex: 0,
|
|
lastKeyIndex: 0,
|
|
step: 0,
|
|
categories: new Set([CommandCategories.FAST, CommandCategories.CONNECTION])
|
|
}]
|
|
);
|
|
}, {
|
|
minimumRedisVersion: [6]
|
|
});
|
|
});
|