Bump common (#5043)
* Bump common * Adjust deprecated util signatures * Adjust * Adjust http mock typings
This commit is contained in:
@@ -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\]/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user