1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
node-redis/packages/client/lib/commands/CLUSTER_ADDSLOTSRANGE.spec.ts
Avital Fine 6b8a40a36b Support new cluster commands (#2050)
* Support new cluster commands

* clean code

Co-authored-by: leibale <leibale1998@gmail.com>
2022-03-27 13:06:27 -04:00

30 lines
806 B
TypeScript

import { strict as assert } from 'assert';
import { transformArguments } from './CLUSTER_ADDSLOTSRANGE';
describe('CLUSTER ADDSLOTSRANGE', () => {
describe('transformArguments', () => {
it('single', () => {
assert.deepEqual(
transformArguments({
start: 0,
end: 1
}),
['CLUSTER', 'ADDSLOTSRANGE', '0', '1']
);
});
it('multiple', () => {
assert.deepEqual(
transformArguments([{
start: 0,
end: 1
}, {
start: 2,
end: 3
}]),
['CLUSTER', 'ADDSLOTSRANGE', '0', '1', '2', '3']
);
});
});
});