1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-11 22:42:42 +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('LMPOP', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments('key', {
SIDE: 'LEFT'
}),
transformArguments('key', 'LEFT'),
['LMPOP', '1', 'key', 'LEFT']
);
});
it('with score and count', () => {
it('with COUNT', () => {
assert.deepEqual(
transformArguments('key', {
SIDE: 'LEFT',
transformArguments('key', 'LEFT', {
COUNT: 2
}),
['LMPOP', '1', 'key', 'LEFT', 'COUNT', '2']
@@ -26,11 +23,9 @@ describe('LMPOP', () => {
});
});
testUtils.testWithClient('client.zmScore', async client => {
testUtils.testWithClient('client.lmPop', async client => {
assert.deepEqual(
await client.lmPop('key', {
SIDE: 'RIGHT'
}),
await client.lmPop('key', 'RIGHT'),
null
);
}, GLOBAL.SERVERS.OPEN);