useFakeTimers 與 setTimeout 一起使用,而不與RxJs的延遲運算子一起使用: ... { const spy = jest.fn(); setTimeout(spy, 20); expect(spy).not.
確定! 回上一頁