You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-17 19:41:06 +03:00
28 lines
764 B
TypeScript
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),
|
|
''
|
|
);
|
|
});
|
|
});
|