You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +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
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import { strict as assert } from 'node:assert';
|
|
import testUtils, { GLOBAL } from '../../test-utils';
|
|
import INFO from './INFO';
|
|
|
|
describe('CF.INFO', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
INFO.transformArguments('cuckoo'),
|
|
['CF.INFO', 'cuckoo']
|
|
);
|
|
});
|
|
|
|
testUtils.testWithClient('client.cf.info', async client => {
|
|
const [, reply] = await Promise.all([
|
|
client.cf.reserve('key', 4),
|
|
client.cf.info('key')
|
|
]);
|
|
|
|
assert.equal(typeof reply, 'object');
|
|
assert.equal(typeof reply['Size'], 'number');
|
|
assert.equal(typeof reply['Number of buckets'], 'number');
|
|
assert.equal(typeof reply['Number of filters'], 'number');
|
|
assert.equal(typeof reply['Number of items inserted'], 'number');
|
|
assert.equal(typeof reply['Number of items deleted'], 'number');
|
|
assert.equal(typeof reply['Bucket size'], 'number');
|
|
assert.equal(typeof reply['Expansion rate'], 'number');
|
|
assert.equal(typeof reply['Max iterations'], 'number');
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
});
|