Testing for an error not being thrown by an async function

后端 未结 0 1563
青春惊慌失措
青春惊慌失措 2021-01-19 21:28

I\'m trying to test for an error not being thrown, and I\'ve done the following in my test:

await expect(() => execute(1, 1)).rejects.not.toThrow()
         


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