You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
add positive test for LINDEX
This commit is contained in:
@@ -10,12 +10,23 @@ describe('LINDEX', () => {
|
||||
);
|
||||
});
|
||||
|
||||
testUtils.testWithClient('client.lIndex', async client => {
|
||||
assert.equal(
|
||||
await client.lIndex('key', 0),
|
||||
null
|
||||
);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
describe('client.lIndex', () => {
|
||||
testUtils.testWithClient('null', async client => {
|
||||
assert.equal(
|
||||
await client.lIndex('key', 0),
|
||||
null
|
||||
);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
|
||||
testUtils.testWithClient('with value', async client => {
|
||||
const [, lIndexReply] = await Promise.all([
|
||||
client.lPush('key', 'element'),
|
||||
client.lIndex('key', 0)
|
||||
]);
|
||||
|
||||
assert.equal(lIndexReply, 'element');
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
||||
|
||||
testUtils.testWithCluster('cluster.lIndex', async cluster => {
|
||||
assert.equal(
|
||||
|
Reference in New Issue
Block a user