1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
This commit is contained in:
Leibale
2023-06-22 18:26:22 -04:00
parent 2b318d4100
commit 4a9d934b84
2 changed files with 37 additions and 6 deletions

View File

@@ -13,11 +13,22 @@ describe('ZINTERCARD', () => {
);
});
it('with limit', () => {
assert.deepEqual(
ZINTERCARD.transformArguments(['1', '2'], 1),
['ZINTERCARD', '2', '1', '2', 'LIMIT', '1']
);
describe('with LIMIT', () => {
it('plain number (backwards compatibility)', () => {
assert.deepEqual(
ZINTERCARD.transformArguments(['1', '2'], 1),
['ZINTERCARD', '2', '1', '2', 'LIMIT', '1']
);
});
it('{ LIMIT: number }', () => {
assert.deepEqual(
ZINTERCARD.transformArguments(['1', '2'], {
LIMIT: 1
}),
['ZINTERCARD', '2', '1', '2', 'LIMIT', '1']
);
});
});
});