You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
fix GETRANGE spec
This commit is contained in:
@@ -1,26 +1,22 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './GETRANGE';
|
import GETRANGE from './GETRANGE';
|
||||||
|
|
||||||
describe('GETRANGE', () => {
|
describe('GETRANGE', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key', 0, -1),
|
GETRANGE.transformArguments('key', 0, -1),
|
||||||
['GETRANGE', 'key', '0', '-1']
|
['GETRANGE', 'key', '0', '-1']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testUtils.testWithClient('client.getRange', async client => {
|
testUtils.testAll('getRange', async client => {
|
||||||
assert.equal(
|
assert.equal(
|
||||||
await client.getRange('key', 0, -1),
|
await client.getRange('key', 0, -1),
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
}, GLOBAL.SERVERS.OPEN);
|
}, {
|
||||||
|
client: GLOBAL.SERVERS.OPEN,
|
||||||
testUtils.testWithCluster('cluster.lTrim', async cluster => {
|
cluster: GLOBAL.CLUSTERS.OPEN
|
||||||
assert.equal(
|
});
|
||||||
await cluster.getRange('key', 0, -1),
|
|
||||||
''
|
|
||||||
);
|
|
||||||
}, GLOBAL.CLUSTERS.OPEN);
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user