Bump dev & adjust duplicated exports (#5651)

This commit is contained in:
Jaco
2023-05-21 12:40:07 +03:00
committed by GitHub
parent 0e46592f4d
commit 3d0a1701fa
45 changed files with 418 additions and 123 deletions
@@ -39,10 +39,12 @@ describe('Ws', (): void => {
).toEqual(false);
});
// eslint-disable-next-line jest/expect-expect
it('allows you to initialize the provider with custom headers', () => {
createWs([], 100, { foo: 'bar' });
});
// eslint-disable-next-line jest/expect-expect
it('allows you to set custom timeout value for handlers', () => {
const CUSTOM_TIMEOUT_S = 90;
const CUSTOM_TIMEOUT_MS = CUSTOM_TIMEOUT_S * 1000;
@@ -52,6 +54,7 @@ describe('Ws', (): void => {
});
describe('Endpoint Parsing', (): void => {
// eslint-disable-next-line jest/expect-expect
it('Succeeds when WsProvider endpoint is a valid string', () => {
/* eslint-disable no-new */
new WsProvider(TEST_WS_URL, 0);
@@ -63,6 +66,7 @@ describe('Endpoint Parsing', (): void => {
).toThrow(/^Endpoint should start with /);
});
// eslint-disable-next-line jest/expect-expect
it('Succeeds when WsProvider endpoint is a valid array', () => {
const endpoints: string[] = ['ws://127.0.0.1:9955', 'wss://testnet.io:9944', 'ws://mychain.com:9933'];
@@ -59,6 +59,7 @@ describe('send', (): void => {
ws
.send('test_encoding', [{ error: 'send error' }])
.catch((error): void => {
// eslint-disable-next-line jest/no-conditional-expect
expect((error as Error).message).toEqual('send error');
})
);
@@ -99,6 +100,7 @@ describe('send', (): void => {
ws
.send('test_error', [])
.catch((error): void => {
// eslint-disable-next-line jest/no-conditional-expect
expect((error as Error).message).toMatch(/666: error/);
})
);