在这里,我们通过调用jest.useFakeTimers() 来启用假定时器。这用模拟函数模拟了setTimeout 和其他计时器函数。定时器可以通过jest.useRealTimers() 恢复到它们的正常 ...
確定! 回上一頁