Last active
August 29, 2015 14:02
-
-
Save stefanpenner/acbee895d33990cddfa6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
promise = new Promise(funciton(resolve, reject) { | |
setTimeout(function() { | |
// good practice to run-loop here, but not totally required. Just for extra perf/consistency | |
Ember.run(null, resolve, 'fullfillment value'); | |
}) | |
}) | |
// this queues a task to flush later, so it requires the run-loop | |
// in testing on master ember (Ember.testing = true) we just do it for you | |
promise.then(function() { | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment