1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00
Files
node-redis/packages/client/lib/commands/XGROUP_CREATECONSUMER.spec.ts

26 lines
793 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './XGROUP_CREATECONSUMER';
describe('XGROUP CREATECONSUMER', () => {
testUtils.isVersionGreaterThanHook([6, 2]);
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 'group', 'consumer'),
['XGROUP', 'CREATECONSUMER', 'key', 'group', 'consumer']
);
});
testUtils.testWithClient('client.xGroupCreateConsumer', async client => {
await client.xGroupCreate('key', 'group', '$', {
MKSTREAM: true
});
assert.equal(
await client.xGroupCreateConsumer('key', 'group', 'consumer'),
true
);
}, GLOBAL.SERVERS.OPEN);
});