From 438aa9f6f4e0fcc68e6015b2d712eae97e3ef848 Mon Sep 17 00:00:00 2001 From: jdevcs Date: Wed, 11 Oct 2023 14:19:43 +0200 Subject: [PATCH] test updated --- packages/web3-utils/test/unit/socket_provider.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web3-utils/test/unit/socket_provider.test.ts b/packages/web3-utils/test/unit/socket_provider.test.ts index d50f9aaffac..9c20df7fdd3 100644 --- a/packages/web3-utils/test/unit/socket_provider.test.ts +++ b/packages/web3-utils/test/unit/socket_provider.test.ts @@ -85,14 +85,14 @@ describe('SocketProvider', () => { // @ts-expect-error run protected method expect(provider._reconnect).not.toHaveBeenCalled(); }); - it('should be called when { autoReconnect: true }', () => { + it('should not call _reconnect with empty response when { autoReconnect: true }', () => { const reconnectOptions = { autoReconnect: true }; const provider = new TestProvider(socketPath, socketOption, reconnectOptions); // @ts-expect-error run protected method jest.spyOn(provider, '_reconnect').mockReturnValue(''); provider.message(''); // @ts-expect-error run protected method - expect(provider._reconnect).toHaveBeenCalled(); + expect(provider._reconnect).not.toHaveBeenCalled(); }); });