Bump common (#5043)

* Bump common

* Adjust deprecated util signatures

* Adjust

* Adjust http mock typings
This commit is contained in:
Jaco
2022-07-08 09:31:49 +03:00
committed by GitHub
parent 3c5091f2d0
commit fd5b48058e
23 changed files with 249 additions and 196 deletions
+3 -6
View File
@@ -21,7 +21,6 @@ describe('send', (): void => {
});
it('passes the body through correctly', (): Promise<void> => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
mock = mockHttp([{
method: 'test_body',
reply: {
@@ -32,8 +31,7 @@ describe('send', (): void => {
return http
.send('test_body', ['param'])
.then((): void => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect((mock.body as any).test_body).toEqual({
expect(mock.body.test_body).toEqual({
id: 1,
jsonrpc: '2.0',
method: 'test_body',
@@ -42,8 +40,7 @@ describe('send', (): void => {
});
});
it('throws error when !response.ok', (): Promise<any> => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
it('throws error when !response.ok', async (): Promise<any> => {
mock = mockHttp([{
code: 500,
method: 'test_error'
@@ -52,7 +49,7 @@ describe('send', (): void => {
return http
.send('test_error', [])
.catch((error): void => {
expect((error as Error).message).toMatch(/\[500\]: Internal Server/);
expect((error as Error).message).toMatch(/\[500\]/);
});
});
});