1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/packages/client/lib/commands/XINFO_STREAM.spec.ts
2023-06-28 11:40:55 -04:00

35 lines
820 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import XINFO_STREAM from './XINFO_STREAM';
describe('XINFO STREAM', () => {
it('transformArguments', () => {
assert.deepEqual(
XINFO_STREAM.transformArguments('key'),
['XINFO', 'STREAM', 'key']
);
});
testUtils.testAll('xInfoStream', async client => {
const [, reply] = await Promise.all([
client.xGroupCreate('key', 'group', '$', {
MKSTREAM: true
}),
client.xInfoStream('key')
]);
assert.deepEqual(reply, {
length: 0,
radixTreeKeys: 0,
radixTreeNodes: 1,
groups: 1,
lastGeneratedId: '0-0',
firstEntry: null,
lastEntry: null
});
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});