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/XREVRANGE.spec.ts

31 lines
873 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './XREVRANGE';
describe('XREVRANGE', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments('key', '-', '+'),
['XREVRANGE', 'key', '-', '+']
);
});
it('with COUNT', () => {
assert.deepEqual(
transformArguments('key', '-', '+', {
COUNT: 1
}),
['XREVRANGE', 'key', '-', '+', 'COUNT', '1']
);
});
});
testUtils.testWithClient('client.xRevRange', async client => {
assert.deepEqual(
await client.xRevRange('key', '+', '-'),
[]
);
}, GLOBAL.SERVERS.OPEN);
});