用Promise.catch 测试一个异步的错误 test('tests error with promises', async () => { expect.assertions(1); return user.getUserName(2).catch(e => expect(e).
確定! 回上一頁