how to re-render after getting axios response in jest test
问题 My component: componentDidMount() { // Make HTTP reques with Axios axios.get(APIConfig.api_profile()).then((res) => { // Set state with result this.setState(res.data); console.log('I was triggered during componentDidMount') console.log(res) }); } And my test: //@see https://github.com/ctimmerm/axios-mock-adapter mock.onGet(APIConfig.api_profile()).reply(200, { "id_user": "1", "id_person": "1", "imageUrl": "", "email": "xyz@zyz.com", "name": "xyz xyz" }); test('xyz', async() => { var