1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Flatten array arguments in legacyMode multi commands (#2064)

This commit is contained in:
Joe Price
2022-04-06 08:43:32 -07:00
committed by GitHub
parent d8e9da0f8e
commit 329885b4ae
2 changed files with 15 additions and 1 deletions

View File

@@ -294,6 +294,20 @@ describe('Client', () => {
}
}
});
testUtils.testWithClient('client.multi.{command}.exec should flatten array arguments', async client => {
assert.deepEqual(
await client.multi()
.sAdd('a', ['b', 'c'])
.v4.exec(),
[2])
}, {
...GLOBAL.SERVERS.OPEN,
clientOptions: {
legacyMode: true
}
});
});
describe('events', () => {