Skip to content

Commit

Permalink
test updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevcs committed Oct 11, 2023
1 parent 93f7d9c commit 438aa9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web3-utils/test/unit/socket_provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});

Expand Down

0 comments on commit 438aa9f

Please sign in to comment.