1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

fix #1766 - allow .quit() in PubSub mode

This commit is contained in:
leibale
2021-12-08 10:28:34 -05:00
parent e11256854e
commit ac808ea781
3 changed files with 21 additions and 2 deletions

View File

@@ -668,6 +668,16 @@ describe('Client', () => {
await subscriber.disconnect();
}
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithClient('should be able to quit in PubSub mode', async client => {
await client.subscribe('channel', () => {
// noop
});
await assert.doesNotReject(client.quit());
assert.equal(client.isOpen, false);
}, GLOBAL.SERVERS.OPEN);
});
testUtils.testWithClient('ConnectionTimeoutError', async client => {