You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
some commands
This commit is contained in:
@@ -13,22 +13,36 @@ describe('ZUNION', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('keys (array)', () => {
|
||||
it('keys (Array<string>)', () => {
|
||||
assert.deepEqual(
|
||||
ZUNION.transformArguments(['1', '2']),
|
||||
['ZUNION', '2', '1', '2']
|
||||
);
|
||||
});
|
||||
|
||||
it('with WEIGHTS', () => {
|
||||
it('key & weight', () => {
|
||||
assert.deepEqual(
|
||||
ZUNION.transformArguments('key', {
|
||||
WEIGHTS: [1]
|
||||
ZUNION.transformArguments({
|
||||
key: 'key',
|
||||
weight: 1
|
||||
}),
|
||||
['ZUNION', '1', 'key', 'WEIGHTS', '1']
|
||||
);
|
||||
});
|
||||
|
||||
it('keys & weights', () => {
|
||||
assert.deepEqual(
|
||||
ZUNION.transformArguments([{
|
||||
key: 'a',
|
||||
weight: 1
|
||||
}, {
|
||||
key: 'b',
|
||||
weight: 2
|
||||
}]),
|
||||
['ZUNION', '2', 'a', 'b', 'WEIGHTS', '1', '2']
|
||||
);
|
||||
});
|
||||
|
||||
it('with AGGREGATE', () => {
|
||||
assert.deepEqual(
|
||||
ZUNION.transformArguments('key', {
|
||||
|
Reference in New Issue
Block a user