Skip to content

Commit

Permalink
chore(ts): fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
amen-souissi committed Mar 15, 2021
1 parent a3e8b58 commit 864207d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@decathlon/moon-testing",
"version": "0.1.1",
"version": "0.1.2",
"description": "Moon testing utilities.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class AxiosClient {
}

export function mockAxiosClientConstructor(ClientFactory = AxiosClient): void {
Axios.create = ({ baseUrl }) => {
Axios.create = ({ baseUrl }: { baseUrl: string }) => {
return new ClientFactory(baseUrl);
};
}
Expand All @@ -45,6 +45,7 @@ mockAxiosClientConstructor(AxiosClient);

export const cancelToken = { cancel: () => jest.fn() };

//@ts-ignore
StaticAxios.CancelToken.source = () => cancelToken;

export { default as MoonClient } from "./moon-client";
Expand Down

0 comments on commit 864207d

Please sign in to comment.