emberjs/ember.js — pull request #2619 by tricknotes (2013-05-02 11:19:40+00:00)
Title: Wait scheduled timers completed

Some tests for `Ember.run.later` are sometimes failed.
This cause is that the wait time of `setTimeout` (it is flexible) is often too short to wait run loop completed.
The waiting all run loop completed solves this problem.

Another advantage in this solution is that the total time for testing become shorter as possible as it can.

In my local, testing `http://localhost:9292/?package=ember-metal` became faster 2903 ms -> 2172 ms. (Chrome/27.0.1453.73 - Mac OS X 10.7.5)