-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Top level await #4007
Top level await #4007
Conversation
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.
Took it for a spin locally, and you have no idea how having the ability to do this:
import { open, SeekMode } from 'k6/experimental/fs'
const file = await open('package.json')
export default async function () {
// ...
}
Makes me happy! Great job @mstoykov, thanks a lot for making this happen, much appreciated! 🙇🏻 🎉 🚀
The base branch was changed.
667e0c5
to
6e84cca
Compare
Co-authored-by: Joan López de la Franca Beltran <[email protected]>
It's worth updating also examples (like |
@olegbespalov 👍🏻 I'm on it. |
What?
top-level-await support
Why?
It is part of the specification and it is hepful if you have async APIs ... which k6 starts to get more and more off.
Checklist
make lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)