Remove real setTimeout from test to prevent blockage
Remember to restore clock
Use fake timers to prevent slow blocking tests
Formatting