Minimize setTimeout delays in tests