📜  开玩笑地期望异步函数抛出错误 - Javascript 代码示例

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

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