Skip to content

Instantly share code, notes, and snippets.

@stefanpenner
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanpenner/acbee895d33990cddfa6 to your computer and use it in GitHub Desktop.
Save stefanpenner/acbee895d33990cddfa6 to your computer and use it in GitHub Desktop.
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