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
@babel/preset-env v7.7.1 update breaks async test #10659
Comments
Hey @bernardodomingues-hotmart! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
@bernardodomingues-hotmart I could not reproduce this issue on REPL and runkit. Could you draft a reproducible example? |
HI @JLHwung! Thanks for the response. I've tried to set it up, but unfortunately, I wasn't able to reproduce this behavior on a simple and isolated code. My original faulty code involves I might refactor my tests to be less brittle regarding the async code execution order instead. Nevertheless, the update introduced some unexpected behavior and it might be worth to look over it again under this new light. Best regards |
This runkit is a little closer to my use case but does not present the unexpected behavior |
We're looking into a similar issue (things happening in a different order after moving from 7.6 to 7.7 - not sure about details just yet). I think another suspect could be #9481. |
Closing since it was not possible to reproduce this issue. |
Bug Report
Current Behavior
I have a test that starts an async function but asserts the app state synchronously. When
@babel/preset-env
was updated tov7.7.1
fromv7.6.3
, the test broke because the async code is executed before the synchronous assertion is made.Input Code
Expected behavior/code
The test should assess the app's state after the synchronous code has run, ignoring state change after any asynchronous code.
Babel Configuration (.babelrc, package.json, cli command)
Environment
node:12
Possible Solution
So far, rolling back
@babel/preset-env
to versionv7.6.3
fixed the issue.Additional context/Screenshots
This might be a bug introduced by #10422, which was the only update in
@babel/preset-env
I could find in the changelog that was related to async code execution.The text was updated successfully, but these errors were encountered: