What does act(() => promise.resolve()) do exactly in my test

后端 未结 0 1967
孤独总比滥情好
孤独总比滥情好 2020-12-15 10:02

I have a few tests that have synchronous code since it uses fetch responses. When i don\'t have this line "await act(() => Promise.resolve());", i get this erro

相关标签:
回答
  • 消灭零回复
提交回复
热议问题