1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/lib/commands/XCLAIM_JUSTID.spec.ts
2021-06-17 18:22:46 -04:00

27 lines
864 B
TypeScript

import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments } from './XCLAIM_JUSTID';
describe('XCLAIM JUSTID', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 'group', 'consumer', 1, '0-0'),
['XCLAIM', 'key', 'group', 'consumer', '1', '0-0', 'JUSTID']
);
});
itWithClient(TestRedisServers.OPEN, 'client.xClaimJustId', async client => {
await Promise.all([
client.xGroupCreate('key', 'group', '$', {
MKSTREAM: true
}),
client.xGroupCreateConsumer('key', 'group', 'consumer'),
]);
assert.deepEqual(
await client.xClaimJustId('key', 'group', 'consumer', 1, '0-0'),
[]
);
});
});