📜  jest test tothrow on async 函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:40.344000             🧑  作者: Mango

代码示例1
it('should test async errors', async () =>  {        
    await expect(failingAsyncTest())
    .rejects
    .toThrow('I should fail');
});