For testing code logic that uses setTimeout, use of an emulated setTimeout implementation can:
- allow a precise execution order scenario to be specified
- avoid actual n-millisecond pauses and race conditions
- enable fully synchronous execution, giving better stack traces, and avoiding problems if an exception is raised before QUnit.start() / assert.async()...done() runs.
Not much code needs this, but it better testing could avoid some really nasty debugging headaches later on.