-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace then chains with async-await #389
Conversation
Is this for v5? Since we'd need to drop v6 and v7. |
Node 6 has been EOLed so it shouldn't be used. But you are right. Maybe we should leave this for v5. |
test/index.js
Outdated
// eslint-disable-next-line no-console | ||
}).catch(console.error); | ||
console.error(err); | ||
} | ||
} | ||
}; | ||
|
||
Promise.all([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be const [jsonFixtures, ...] = await Promise.all()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't because it's at the top level of the file.
To do that we would need to wrap the whole thing in a function and then invoke it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah, didn't see that with github's hiding of the unedited part 👍
@knownasilya please merge this when you have time and I'll continue closing tickets for v5. |
A bit cleaner