1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-17 19:41:06 +03:00
Files
node-redis/lib/commands/GETRANGE.spec.ts
2021-07-13 19:35:07 -04:00

28 lines
764 B
TypeScript

import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './GETRANGE';
describe('GETRANGE', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 0, -1),
['GETRANGE', 'key', '0', '-1']
);
});
itWithClient(TestRedisServers.OPEN, 'client.getRange', async client => {
assert.equal(
await client.getRange('key', 0, -1),
''
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.lTrim', async cluster => {
assert.equal(
await cluster.getRange('key', 0, -1),
''
);
});
});