You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-17 19:41:06 +03:00
26 lines
838 B
TypeScript
26 lines
838 B
TypeScript
import { strict as assert } from 'assert';
|
|
import { TestRedisServers, itWithClient, describeHandleMinimumRedisVersion } from '../test-utils';
|
|
import { transformArguments } from './XGROUP_CREATECONSUMER';
|
|
|
|
describe('XGROUP CREATECONSUMER', () => {
|
|
describeHandleMinimumRedisVersion([6, 2]);
|
|
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
transformArguments('key', 'group', 'consumer'),
|
|
['XGROUP', 'CREATECONSUMER', 'key', 'group', 'consumer']
|
|
);
|
|
});
|
|
|
|
itWithClient(TestRedisServers.OPEN, 'client.xGroupCreateConsumer', async client => {
|
|
await client.xGroupCreate('key', 'group', '$', {
|
|
MKSTREAM: true
|
|
});
|
|
|
|
assert.equal(
|
|
await client.xGroupCreateConsumer('key', 'group', 'consumer'),
|
|
true
|
|
);
|
|
});
|
|
});
|