我试图在测试函数中取消模拟 axios 模块,但即使我已经声明了 dontMock 函数,它也会继续返回模拟的响应。我究竟做错了什么?
import Axios from 'axios';
jest.mock('axios');
describe('Testing Async Selectors', () =>
it('should render empty dropdown', async () => {
console.log(Axios);
});
it('should render empty dropdown', async () => {
jest.dontMock('axios');
console.log(Axios);
});
});