pairwise-tech / pairwise

The Pairwise Codebase
https://app.pairwise.tech
6 stars 0 forks source link

Start Async Challenge Content #204

Closed bonham000 closed 4 years ago

bonham000 commented 4 years ago

This PR:

Notes:

Coming Later:

iansinnott commented 4 years ago

TIL Promise.allSettled is a thing. Nice! As an aside, what happens with Promise.all if one of them throws? Does the whole thing throw?

Break the tests with every commit 🤷

I support this 👍

Incidentally, the async challenges make the test loading state much more useful

Awesome, glad to hear

bonham000 commented 4 years ago

@iansinnott yes, Promise.all will throw whenever any (the first) contained promise rejects, whereas Promise.allSettled will wait for all contained promises to resolve or reject and then produce an array of data representing the results. Because of this, I think Promise.allSettled should not throw errors.