1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-13 10:02:24 +03:00

clean code

This commit is contained in:
leibale
2022-04-14 15:01:15 -04:00
parent c26968a32b
commit 4558ec6a31
10 changed files with 89 additions and 85 deletions

View File

@@ -8,17 +8,14 @@ describe('BLMPOP', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments(0, 'key', {
SIDE: 'LEFT'
}),
transformArguments(0, 'key', 'LEFT'),
['BLMPOP', '0', '1', 'key', 'LEFT']
);
});
it('with score and count', () => {
it('with COUNT', () => {
assert.deepEqual(
transformArguments(0, 'key', {
SIDE: 'LEFT',
transformArguments(0, 'key', 'LEFT', {
COUNT: 2
}),
['BLMPOP', '0', '1', 'key', 'LEFT', 'COUNT', '2']
@@ -28,9 +25,7 @@ describe('BLMPOP', () => {
testUtils.testWithClient('client.zmScore', async client => {
assert.deepEqual(
await client.blmPop(0, 'key', {
SIDE: 'LEFT'
}),
await client.blmPop(0, 'key', 'RIGHT'),
null
);
}, GLOBAL.SERVERS.OPEN);