You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-16 08:41:57 +03:00
RESP3 Support - Some commands responses in RESP3 aren't stable yet and therefore return an "untyped" ReplyUnion. Sentinel TypeMapping Correctly types Multi commands Note: some API changes to be further documented in v4-to-v5.md
29 lines
732 B
TypeScript
29 lines
732 B
TypeScript
import { strict as assert } from 'node:assert';
|
|
import testUtils, { GLOBAL } from '../../test-utils';
|
|
import INFO from './INFO';
|
|
|
|
describe('CMS.INFO', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
INFO.transformArguments('key'),
|
|
['CMS.INFO', 'key']
|
|
);
|
|
});
|
|
|
|
testUtils.testWithClient('client.cms.info', async client => {
|
|
const width = 1000,
|
|
depth = 5,
|
|
[, reply] = await Promise.all([
|
|
client.cms.initByDim('key', width, depth),
|
|
client.cms.info('key')
|
|
]);
|
|
|
|
const expected = Object.create(null);
|
|
expected['width'] = width;
|
|
expected['depth'] = depth;
|
|
expected['count'] = 0;
|
|
|
|
assert.deepEqual(reply, expected);
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
});
|