Last active
February 6, 2019 00:19
-
-
Save rimian/7c38c990255d425e565b1f09ef819c8c to your computer and use it in GitHub Desktop.
Promises
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
stubPromise = () => new Em.RSVP.Promise(() => {}); | |
promise_1 = Em.RSVP.defer({ promise: stubPromise() }); | |
promise_2 = Em.RSVP.defer({ promise: stubPromise() }); | |
promise_1.promise.then(() => console.warn(1, moment().valueOf())); | |
promise_2.promise.then(() => console.warn(2, moment().valueOf())); | |
moment().valueOf(); promise_1.resolve(); promise_2.resolve(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment