Bump dev & adjust duplicated exports (#5651)
This commit is contained in:
@@ -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/);
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user