除了 使用 .catch 註冊一個會執行 expect 的callback 之外。最好再加一個 expect.assertions(1); 讓Jest 知道你應該要執行一次assertion。
確定! 回上一頁