You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
27 lines
755 B
TypeScript
27 lines
755 B
TypeScript
import { strict as assert } from 'assert';
|
|
import testUtils, { GLOBAL } from '../test-utils';
|
|
import { transformArguments } from './SETRANGE';
|
|
|
|
describe('SETRANGE', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
transformArguments('key', 0, 'value'),
|
|
['SETRANGE', 'key', '0', 'value']
|
|
);
|
|
});
|
|
|
|
testUtils.testWithClient('client.setRange', async client => {
|
|
assert.equal(
|
|
await client.setRange('key', 0, 'value'),
|
|
5
|
|
);
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
|
|
testUtils.testWithCluster('cluster.setRange', async cluster => {
|
|
assert.equal(
|
|
await cluster.setRange('key', 0, 'value'),
|
|
5
|
|
);
|
|
}, GLOBAL.CLUSTERS.OPEN);
|
|
});
|