DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Testing Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
easy
Testing
Why should mock timers (`vi.useFakeTimers()`) be used to test timeout operations like `setTimeout`?
A
Because Node.js forbid real timers inside tests
B
To fast-forward time instantly, avoiding slow test executions that block pipeline runs
C
To compile JavaScript timers to WebAssembly
D
To optimize database read connections
Check Answer