1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
This commit is contained in:
Leibale
2023-06-29 14:39:49 -04:00
parent ea2d9d2a77
commit c109fbf751
36 changed files with 584 additions and 720 deletions

View File

@@ -23,8 +23,8 @@ describe('LMPOP', () => {
});
});
testUtils.testAll('lmPop', async client => {
assert.deepEqual(
testUtils.testAll('lmPop - null', async client => {
assert.equal(
await client.lmPop('key', 'RIGHT'),
null
);
@@ -32,4 +32,19 @@ describe('LMPOP', () => {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.SERVERS.OPEN
});
testUtils.testAll('lmPop - with member', async client => {
const [, reply] = await Promise.all([
client.lPush('key', 'element'),
client.lmPop('key', 'RIGHT')
]);
assert.deepEqual(reply, [
'key',
['element']
]);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.SERVERS.OPEN
});
});