File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @decathlon/moon-testing" ,
3- "version" : " 0.0.2 " ,
3+ "version" : " 0.1.0 " ,
44 "description" : " Moon testing utilities." ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -36,16 +36,16 @@ export class AxiosClient {
3636}
3737
3838export function mockAxiosClientConstructor ( ClientFactory = AxiosClient ) : void {
39- Axios . create = jest . fn ( ) . mockImplementation ( ( { baseUrl } ) => {
39+ Axios . create = ( { baseUrl } ) => {
4040 return new ClientFactory ( baseUrl ) ;
41- } ) ;
41+ } ;
4242}
4343
4444mockAxiosClientConstructor ( AxiosClient ) ;
4545
4646export const cancelToken = { cancel : ( ) => jest . fn ( ) } ;
4747
48- StaticAxios . CancelToken . source = jest . fn ( ) . mockReturnValue ( cancelToken ) ;
48+ StaticAxios . CancelToken . source = ( ) => cancelToken ;
4949
5050export { default as MoonClient } from "./moon-client" ;
5151export * from "./moon-client" ;
You can’t perform that action at this time.
0 commit comments