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

fix #1636 - handle null in multi.exec

This commit is contained in:
leibale
2021-08-02 14:08:16 -04:00
parent 169912f44c
commit 27344e9626
4 changed files with 54 additions and 19 deletions

View File

@@ -4,7 +4,7 @@ import { encodeCommand } from './commander';
describe('Multi Command', () => {
it('exec', async () => {
const multi = RedisMultiCommand.create(queue => {
const multi = RedisMultiCommand.create((queue, symbol) => {
assert.deepEqual(
queue.map(({encodedCommand}) => encodedCommand),
[
@@ -14,6 +14,11 @@ describe('Multi Command', () => {
]
);
assert.equal(
typeof symbol,
'symbol'
)
return Promise.resolve(['QUEUED', 'QUEUED', ['PONG']]);
});