Add some type hinting post-package update for Axios
This commit is contained in:
parent
6c867925bb
commit
dacfcd2cb8
|
@ -1,4 +1,4 @@
|
||||||
import axios, { AxiosResponse } from 'axios';
|
import axios, { AxiosResponse, InternalAxiosRequestConfig } from 'axios';
|
||||||
|
|
||||||
import { inferTitle } from './inferTitle';
|
import { inferTitle } from './inferTitle';
|
||||||
|
|
||||||
|
@ -14,7 +14,8 @@ test('it returns the correct title', async () => {
|
||||||
status: 200,
|
status: 200,
|
||||||
statusText: 'OK',
|
statusText: 'OK',
|
||||||
headers: {},
|
headers: {},
|
||||||
config: {},
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||||
|
config: {} as unknown as InternalAxiosRequestConfig<unknown>,
|
||||||
};
|
};
|
||||||
axiosGetMock.mockResolvedValue(mockedResponse);
|
axiosGetMock.mockResolvedValue(mockedResponse);
|
||||||
const result = await inferTitle('someurl');
|
const result = await inferTitle('someurl');
|
||||||
|
|
Loading…
Reference in New Issue