Testing · Middle · Question 8 of 75

What does vi.runAllTimers() do differently from vi.advanceTimersByTime(1000)?

Explanation

With an endless setInterval, runAllTimers gives up after a limit of iterations - use runOnlyPendingTimers or advance by time.

Further reading

Problem with a question

Testing · Middle · question 8

Test yourself

Take the Testing · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz