看起来有点像这样:const mockAxios: jest.Mocked<typeof axios> = jest.createMockFromModule("axios");
// this is the key to fix the axios.create() undefined error!const createAuthentic
我对JEST和Axios的单元测试有问题。模拟不工作,我在单元测试期间也得不到数据。我不知道为什么会这样。我唯一的想法是,自从我使用axios.client.get以来,我以一种错误的方式嘲弄它?测试:const mockedAxios = axios as jest.Mocked<typeof axios>;
describe("Test of productsfe