Using fake timers 1 jest.useFakeTimers() setTimeout(() => console.log('100ms are up'), 100) jest.runTimersToTime(100) // logs 100ms are up 2 3 1 Replaces ...
確定! 回上一頁