Skip to content

Commit 9d2912c

Browse files
author
Artem
committed
fix tests
1 parent 2cfe363 commit 9d2912c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

redisinsight/api/src/modules/pub-sub/model/redis-client.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('RedisClient', () => {
4545
it('should wait until first attempt of connection finish with error', async () => {
4646
try {
4747
getRedisClientFn.mockRejectedValueOnce(new Error('Connection error'));
48-
redisClient.getClient().then().catch();
48+
redisClient.getClient().then().catch(() => {});
4949
expect(redisClient['status']).toEqual(RedisClientStatus.Connecting);
5050
expect(await redisClient.getClient()).toEqual(nodeClient);
5151
fail();

redisinsight/api/src/modules/pub-sub/model/redis-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class RedisClient extends EventEmitter2 {
9595
*/
9696
destroy() {
9797
this.client?.removeAllListeners();
98-
this.client?.disconnect();
98+
this.client?.disconnect(false);
9999
this.client = null;
100100
this.status = RedisClientStatus.End;
101101
}

redisinsight/api/test/api/ws/pub-sub/pub-sub.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ describe('pub-sub', function () {
229229

230230
await new Promise((resolve) => {
231231
client.emit('unsubscribe', { subscriptions: [subscription, subscriptionB, pSubscription] }, async (ack) => {
232-
// expect(ack).to.eql({ status: 'ok' });
232+
expect(ack).to.eql({ status: 'ok' });
233233

234234
await rte.data.sendCommand('publish', ['channel-a', 'message-a']);
235235
await rte.data.sendCommand('publish', ['channel-a', 'message-a']);

0 commit comments

Comments
 (0)